jquery - What is the different between $parent.find("children") vs $("children", $parent)? -



jquery - What is the different between $parent.find("children") vs $("children", $parent)? -

this question has reply here:

jquery find versus context selection 4 answers

i know both next statements produce same result,

var $childnode = $parent.find("children"); , var $childnode = $("children", $parent);

but want know 1 improve other , why?

and how these methods vary in implementation?

as stated in the documentation, there no difference:

selector context implemented .find() method; therefore, $( "li.item-ii" ).find( "li" ) equivalent $( "li", "li.item-ii" ).

jquery jquery-selectors

Comments