jquery Hierarchy Selector

Source: Internet
Author: User
Parent > Child

Selects all the immediate child elements of the specified "children" in the "parent" element.

eg

$ ("ul > Li"). CSS ("Border", "1px solid Red"); Child element Combo Selector (E > F) It selects only the descendants of the first level.

Ancestor descendant

Selects all descendant elements of a given ancestor element

eg

$ ("form input"). CSS ("Border", "1px dotted Gray");

Prev + Next

Select All "Next" elements immediately following the "prev" element

eg

$ ("label + Input"). CSS ("Color", "green"). Val ("Ranyc");

Prev ~ siblings

Matches all sibling elements after the "prev" element. Has the same parent element and matches the filter "siblings" selector.

eg

$ ("Label~input"). CSS ("Color", "gray"). Val ("Ranyc");

jquery Hierarchy Selector

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.