parent()
method returns the direct parent element of the selected one. This method only traverse a single level up the DOM tree.
parents()
method allows us to search through the ancestors of these elements in the DOM tree. Begin from given selector and move up.
The **.parents()** and **.parent()** methods are almost similar, except that the latter only travels a single level up the DOM tree. Also, **$( "html" ).parent()** method returns a set containing document whereas **$( "html" ).parents()** returns an empty set.
[closest()][3]method returns the first ancestor of the selected element.An ancestor is a parent, grandparent, great-grandparent, and so on.
This method traverse upwards from the current element, all the way up to the document's root element (<html>), to find the first ancestor of DOM elements.
According to docs:
**closest()** method is similar to **parents()**, in that they both traverse up the DOM tree. The differences are as follows:
**closest()**
Begins with the current element
Travels up the DOM tree and returns the first (single) ancestor that matches the passed expression
The returned jQuery object contains zero or one element
**parents()**
Begins with the parent element
Travels up the DOM tree and returns all ancestors that matches the passed expression
The returned jQuery object contains zero or more than one element