select element by attribute value jquery code example
Example 1: jquery select element based on for attribute
$( "label[for='Hot Fuzz']" )
Example 2: 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();