Given a jQuery object that represents a set of DOM elements, the .closest() method searches through these elements and their ancestors in the DOM tree and constructs a new jQuery object from the matching elements. The .parents() and .closest() methods are similar in that they both traverse up the DOM tree. The differences between the two, though subtle, are significant:
| Travels up the DOM tree to the document's root element, adding each ancestor element to a temporary collection; it then filters that collection based on a selector if one is supplied | |||
| The returned jQuery object contains zero or one element | -The returned jQuery object contains zero, one, or multiple elements | +The returned jQuery object contains zero or one element for each element in the original set | +The returned jQuery object contains zero or more elements for each element in the original set |