From 13c863ce7fd7961571b5d56863e5060f3773fe68 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa 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 Unlike most of the tree traversal methods, the selector expression is required in a call to Selector context is implemented with the 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:.find()
. If we need to retrieve all of the descendant elements, we can pass in the universal selector '*'
to accomplish this..find()
. If we need to retrieve all of the descendant elements, we can pass in the universal selector '*'
to accomplish this..find()
method;
therefore, $( "li.item-ii" ).find( "li" )
is equivalent to $( "li", "li.item-ii" )
.