Common node lookups in jquery, attribute filtering

Source: Internet
Author: User

NOTE: [selector] represents an additive filter node

Jquery.parent ([selector]) find the Father node, you can pass in selector for filtering, such as $ ("span"). Parent () or $ ("span"). Parent (". Class")

Jquery.parents (selector), similar to jquery.parents (selector), but finds all ancestor elements , not limited to parent elements

Jquery.children ([selector]). Returns all child nodes, this method only returns the immediate child node, does not return all descendant nodes, only one layer

Jquery.contents (), returns all of the following , including nodes and text . The difference between this method and children () is that, including blank text, it will be returned as a jquery object, and children () will only return the node

Jquery.prev ([selector]), return to the previous sibling node , not all sibling nodes (do not matter)

Jquery.prevall ([selector]), returning all previous sibling nodes

Jquery.next ([selector]), return to the next sibling node , not all sibling nodes (don't matter)

Jquery.nextall ([selector]), returns all sibling nodes after

Jquery.siblings ([selector]), back to sibling nodes , no points before and after

Jquery.find (selector) starting from the Next level , Jquery.filter (selector) starts at this level

Jquery.last () represents the last of the same object

: Even even lines : Odd cardinality line

[attribute*= ' value ']       contains the Value property [attribute^= ' value '] property that begins with value [attribute$= ' value '] ends with value

: Not ([attr= ' value ']) is equivalent to [attribute!= ' value '] property is not an object of the Value property [Attrsel1][attrsel2][attrseln] multiple Attribute restrictions

Common node lookups in jquery, attribute filtering

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.