From 13c863ce7fd7961571b5d56863e5060f3773fe68 Mon Sep 17 00:00:00 2001 From: Aurelio De Rosa Date: Wed, 22 Jan 2014 12:35:14 +0100 Subject: [PATCH] Update find.xml Fixed issue #395 --- entries/find.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entries/find.xml b/entries/find.xml index 8ce3d0fc..9db417af 100644 --- a/entries/find.xml +++ b/entries/find.xml @@ -49,7 +49,7 @@ $( "li.item-ii" ).find( "li" ).css( "background-color", "red" );

The result of this call is a red background on items A, B, 1, 2, 3, and C. Even though item II matches the selector expression, it is not included in the results; only descendants are considered candidates for the match.

-

Unlike in the rest of the tree traversal methods, the selector expression is required in a call to .find(). If we need to retrieve all of the descendant elements, we can pass in the universal selector '*' to accomplish this.

+

Unlike most of the tree traversal methods, the selector expression is required in a call to .find(). If we need to retrieve all of the descendant elements, we can pass in the universal selector '*' to accomplish this.

Selector context is implemented with the .find() method; therefore, $( "li.item-ii" ).find( "li" ) is equivalent to $( "li", "li.item-ii" ).

As of jQuery 1.6, we can also filter the selection with a given jQuery collection or element. With the same nested list as above, if we start with: