Jquery selection Element

Source: Internet
Author: User

1. CSS selector packaged by jquery

$ ("P a. speciaclass ")

2. subselector (in my personal opinion, a ">" operator is added to the jquery selector, which has a new feature)

$ ("Ul # mylist> LI> A"). fadeout ();

3. Feature selector (in my personal opinion, the "[" "]" operator in the jquery selector has a new feature)

$ ("A [href ^ = http]"). fadeout (); All a headers with HTTP headers

$ ("A [href * = PDF]"). fadeout (); All

4. Container selector (in my personal opinion, there is a ":" operator in the jquery selector, followed by some conditions, and a new feature)

$ ("Li: has (a)"). fadeout ();

1. ":" is followed by has, or a condition that does not exist or does not exist. Has (), not (), the brackets contain a set that can be selected by the CSS selector.

2. ":" The location to be selected. Such as first, Odd, first, even number, and so on.

5. ":" The attributes of the HTML element are directly followed, such as checked, that is, the custom selector,

$ (": Checkbox: checked"). fadeout ();

 

The complexity is the mixed use of this 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.