From d64fa2ba261d8ab69b7b16cf61068ada100410b0 Mon Sep 17 00:00:00 2001 From: Jesse McCarthy Date: Mon, 21 May 2012 16:15:00 -0400 Subject: [PATCH] Linked .parents() mentions. Marked up content as . --- entries/closest.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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()