jQuery Intro

jQuery Intro Quiz

jQuery Intro Exercise

jQuery Basic

jQuery Basic Quiz

jQuery Basic Exercise

jQuery Advance

jQuery Advance Quiz

jQuery Advance Exercise

jQuery Selectors

jQuery Effects

jQuery Events

jQuery Methods and Properties

jQuery Traversing

jQuery CSS and HTML Methods

jQuery filter() Method

jQuery filter() Method



The filter() method is used to return elements that match certain criteria. It allows us to specify criteria for search. Elements that do not match the criteria are removed from the selection, and those that match will be returned.




Its syntax is:- $(selector).filter(criteria, function(index))


Further Explanation:-


Parameter Description
criteria Optional. Specifies a selector expression, a jQuery object or one or more elements to be returned from a group of selected elements.
function(index) Optional. Specifies a function to run for each element in the set. If it returns true, the element is kept. Otherwise, the element is removed.
  • index - The index position of the element in the set

Code Explanation

All Tutorials related to jQuery Traversing

All Sections related to jQuery