On Jan 25, 2009, at 6:50 AM, will wrote:
Hi, I've got a bunch of thumbnails, each with a category and a client name as a class. For example: <ul> <li class="category1 client2">Thumbnail</li> <li class="category2 client1">Thumbnail</li> <li class="category1 client3">Thumbnail</li> <li class="category2 client4">Thumbnail</li> </ul> I need to create a way of filtering those thumbnails using a class. For example, I click on the button to show all thumbnails by client2 and hide everything else. I've tried using the [class!=client1] filter, but I think it is not taking into account the second class name. Adding to the confusion is the possibility that there will also be a class called 'active'. Setting up an alert simply counts all the thumbnails, even if they have the class. Any ideas? Cheers Will
Hi Will, To hide everything except those with a client1 class, do this: $('li:not(.client1)').hide(); --Karl ____________ Karl Swedberg www.englishrules.com www.learningjquery.com