elements contained in the wrapper set. Sample: sample36.html
first
middle
last
Notes: When using filter(), always ask yourself if it is absolutely necessary. For example, $('p').filter(':not(:first):not(:last)') could be written without filter() by passing the jQuery function the expressions as custom selectors $('p:not(:first):not(:last)'). The find() method, on the other hand, can be used to further find descendants of the currently selected elements. Think of find() more like updating or changing the current wrapped set with new elements that are encapsulated within the elements that are already selected. For example, the code below will change the wrapped set from elements to two elements by
using find().
Sample: sample37.html
first