Jquery's find usage

Source: Internet
Author: User

1: both the children and find methods are used to obtain the sub-elements of the element. Neither of them returns the text node, just like most jquery methods.
2: The children method obtains only child elements at the level of elements, namely, immediate children.
3: The find method obtains all lower-level elements, namely, descendants of these elements in the DOM tree.
4: The selector parameter of the children method is optional (optionally) and used to filter sub-elements. However, the selector method of the find method is required.
5: The find method can actually be implemented by using jquery (selector, context): in English, the selector context is implemented with. find () method; therefore, $ ('Li. item-II '). find ('lil') is equivalent to $ ('lil', 'Li. item-II ').

Detailed source reference: http://www.jb51.net/article/26195.htm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.