jquery hide div based on data-attribute code example
Example 1: 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();
Example 2: data attribute hide & show function syntax in jquery
$('.test').hide().filter('[data-word="AAA"][data-type="BBB"][data-number="2"]').show();