Hide Or Show All Divs For A Certain Value Of A Data Attribute
I'm trying to use HTML5 valid markup here, so instead of adding to values to class I want to use the data-*='' to show/hide certain divs.
Solution 1:
Simply use attribute-equals notation:
$('div[data-chattingto="cheesecake"]').hide();
And a JS Fiddle demo, kindly provided by CrunchyV. References:
Post a Comment for "Hide Or Show All Divs For A Certain Value Of A Data Attribute"