First, jquery in children
Grammar
. Children (selector)
Description
Expr is an expression, an optional argument, in which all the expressions in the selector can be used, such as by the tag name "Div", by the class name ". Class", by the ordinal ": first" and so on, if the expression is empty, then return all children, return the result is still a jquery object.
Second, the jquery find
The find () method gets the descendants of each element in the current element collection, filtered by a selector, JQuery object, or element.
Grammar
. Find (selector)
Description
Its accepted selector expression is the same as the type of the expression we passed to the $ () function. The elements are filtered by testing whether the elements match the expression.
Third, the difference between children and find in jquery
1. Children and find methods are used to obtain the sub-elements of element, neither of which will return text node, just like most jquery methods.
2. The children method obtains only the child element of the element one subordinate
3. Find method obtains all subordinate elements
4. The parameter selector of the children method is optional (optionally), which is used to filter the child elements, but the parameter selector method of the Find method is required.
5. The Find method can in fact be implemented by using JQuery (selector, context)
Reference: The difference between children and find in jquery http://www.studyofnet.com/news/974.html
This article is from the "Learning also leisure" blog, please be sure to keep this source http://studyofnet.blog.51cto.com/8142094/1703241
What is the difference between children and find in jquery?