The filter() method returns elements that match a certain criteria.
This method lets you specify a criteria. Elements that do not match the criteria are removed from the selection, and those that match will be returned.This method is often used to narrow down the search for an element in a group of selected elements.
$(selector).filter(criteria,function(index))