The difference between jquery's filter () function and find () function, jqueryfilter
The differences between jquery's filter () function and find () function:
Many functions in jQuery are very convenient to use. At the same time, some functions are very close to each other, which may also cause some misoperations.
The filter () function and the find () function have the same filtering function. The following describes the differences between them.
I. filter () function:
This function is used to filter the matching elements in the element set and return the Matching Element Set. For example:
$ ("Div"). filter (". mytest ");
The above code filters out the div whose class attribute value is mytest In the div Element Set and returns a matching set.
We can also see that the filter () function is used to filter the $ ("div") set.
Ii. find () function:
This function filters child elements in the element set, for example:
$ ("Div"). find (". mytest ");
The code above filters out the elements whose class attribute value is mytest in the child element of the div.
Related reading:
1. For more information about the filter () function, see the filter () method section of jQuery.
2. For more information about the find () function, see find () method in jQuery.
The original address is: http://www.softwhy.com/forum.php? Mod = viewthread & tid = 9344.
For more information, see: http://www.softwhy.com/jquery/