From f537de24bef4f7e1e6695589c204f504cecf05c1 Mon Sep 17 00:00:00 2001
From: Leonardo Balter 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 in the 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" )
.