parent | parents | closest | |
---|---|---|---|
way | The current element is traversed up the DOM tree | Start with the parent element | Start with the current element |
The results of | And returns the first single ancestor of the expression passed by the match | Traverse up the DOM tree and return all ancestors that match the expression passed | The DOM tree traverses up and returns the first single ancestor of the matching expression passed |
The number of | Returns a jQuery object containing zero or one element | Returns a jQuery object with zero, one, or more elements | Returns a jQuery object containing zero or one element |
If you don’t understand the above table, please refer to the following legend: