From 02c5b26c22627709a459fee722f331cd4c24ffa8 Mon Sep 17 00:00:00 2001 From: Jesse McCarthy Date: Mon, 21 May 2012 16:49:05 -0400 Subject: [PATCH] Linked .parents() mention. --- entries/parent.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entries/parent.xml b/entries/parent.xml index 023d2761..a83b9ff5 100644 --- a/entries/parent.xml +++ b/entries/parent.xml @@ -7,7 +7,7 @@ Get the parent of each element in the current set of matched elements, optionally filtered by a selector. -

Given a jQuery object that represents a set of DOM elements, the .parent() method allows us to search through the parents of these elements in the DOM tree and construct a new jQuery object from the matching elements. The .parents() and .parent() methods are similar, except that the latter only travels a single level up the DOM tree.

+

Given a jQuery object that represents a set of DOM elements, the .parent() method allows us to search through the parents of these elements in the DOM tree and construct a new jQuery object from the matching elements. The .parents() and .parent() methods are similar, except that the latter only travels a single level up the DOM tree.

The method optionally accepts a selector expression of the same type that we can pass to the $() function. If the selector is supplied, the elements will be filtered by testing whether they match it.

Consider a page with a basic nested list on it: