diff --git a/entries/closest.xml b/entries/closest.xml index 196b7bd1..545bd09f 100644 --- a/entries/closest.xml +++ b/entries/closest.xml @@ -29,13 +29,13 @@ Get the first element that matches the selector, beginning at the current element and progressing up through the DOM tree. -

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:

+

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:

- - + +
.closest().parents().closest().parents()