Reputation: 272174
<div class="room" data-people="jason">
blah blah
</div>
$(".room with attribute "data-people=jason").hide();
I want to select the room where data-people = jason, and then hide it.
Upvotes: 0
Views: 68
Reputation: 11194
This should do the trick:
$('.room[data-people=jason]').hide();
Upvotes: 1
Reputation: 50982
<div class="room" data-people="jason">
blah blah
</div>
<script>
$(".room[data-people='jason']").hide();
</script>
Upvotes: 2