Element. find(selector) returns the descendants of each element in the set of elements that matches the match. The selector parameter is required. If you want to select all descendant elements, pass the argument to the wildcard selector “*”
Element.children (selector) returns the matched children of each element in the set of Elements. The selector argument is not required. If omitted, all the children of the element are selected. If a parameter is passed, it is filtered through a selector among the child elements to filter out the elements that meet the criteria.
Conclusion: Children traverses only the next level of the specified DOM element, and find traverses all descendant levels of the specified DOM element
Extension: The find method extends the selector context with the find method.
Jquery selector, context) is $(selector, [the context])
Probably most people just use $(selector) to select elements, and if they just pass in the first argument, they’ll look for matching elements from the document element.
If you pass in a second argument, it looks in the context and returns elements in the same order as they appeared in the context.
(this). The find (” p “),(‘li’, ‘li.item-ii’)