Tuesday, 22 May 2012

Filter content using checkboxes & JQuery

I'm having problems making this code work: $(function(){ $('div.tags').delegate('input:checkbox', 'change', function() { var $lis = $('.results > li').hide(); //For each one checked $('input:checked').each(function() { $lis.filter('.' + $(this).attr('rel')).show(); }); }); }); With HTML like: <

No comments:

Post a Comment