I'm trying to use jquery show and hide methods with html5 attributes.
Here is what i'm trying to do:
html file :
<div class="test" data-location="paris">Math</div>
<div class="test" data-location="paris">Physics</div>
<div class="test" data-location="paris">Chemistry</div>
<div class="test" data-location="paris">Biology</div>
script:
$("[data-location="paris"]").hide();
I'm using the jquery to hide all the divs with data-location="paris". I don't know why i can't do it. Help?
$("[data-location=paris]").hide();$("[data-location=\"paris\"]").hide();