Posted On: Feb 22, 2018
The filter method in the jQuery returns certain elements that match the specified criteria. You can specify a criterion with the filter method and apply it to DOM elements. It removes the elements that do not match the specified criteria and allows only that matches. It works like a search function.
Syntax
$(selector).filter(criteria,function(index))
Here the criteria specify an expression that you want to apply to the DOM elements for filtering. You can specify multiple criteria separated by a comma. The function is optional that runs on each specified element. It returns true if the element matches the criteria or false otherwise.
Never Miss an Articles from us.
jQuery is a lightweight JavaScript library which gives a quick and simple method for HTML DOM traversing and manipulati..
There are many advantages of JQuery. Some of them are :It is more like a JavaScript enhancement so there is no overhea..
There are 3 types of selectors in JqueryCSS Selector XPath Selector Custom Selector..