Reputation: 281
I want to hide a div with class charts having title which contain (0%)
for example i have 5 div
<div class="charts" title ="book1 (0%)" ></div>
<div class="charts" title ="book2 (10%)" ></div>
<div class="charts" title ="book3 (20%)" ></div>
<div class="charts" title ="book4 (0%)" ></div>
<div class="charts" title ="book5 (0%)" ></div>
I am doing it with jquery but no luck
Please Help
Upvotes: 0
Views: 133
Reputation: 167172
You can use jQuery's attribute equals selector:
$('.charts[title*="(0%)"]').hide();
Upvotes: 0