find element with attribute jquery code example
Example 1: name selector jquery
$('td[name ="tcol1"]')
$('td[name^="tcol"]' )
$('td[name$="tcol"]' )
$('td[name*="tcol"]' )
Example 2: find element with data attribute jquery
$("ul").find(`[data-slide='${current}']`)
Example 3: jquery show hide based on data attribute
$('form')
.children()
.filter(function(){
return $(this).data('show') === 'pro';
})
.show();
$('form')
.children()
.filter(function(){
return $(this).data('show') === 'home';
})
.hide();