Launch offer
Business website $150 USD Custom plugin $200 USD Ready in 5 days
Get a quote
jQuery

Filter and Not in jQuery

Narrow selections with filter() and exclude with not().

Filter and Not in jQuery — a practical guide to jQuery filter not with clear examples you can reuse in real projects.

jQuery Tutorial Series (52/101). Prefer one article? Read the complete jQuery tutorial.

Short description

filter can take a selector or a function.

filter not

$('li').filter('.active');
$('li').not('.disabled');
$('li').filter(function () {
  return $(this).data('score') > 5;
});

Leave a reply

Your email address will not be published. Required fields are marked *