JQuery Selector Detailed

Source: Internet
Author: User

Example Description
$ (This) Current element
$ ("P") All <p> elements
$ ("input") All input elements
$ (". Intro") All elements of class= "Intro"
$ ("P.intro") All <p> elements of class= "Intro"
$ ("#intro") Id= first element of "intro"
$ ("ul > li") All LI nodes under UL
$ ("ul Li:first") The first <li> element of each <ul>
$ ("ul Li:first") The last <li> element for each <ul>
$ ("[href$= '. jpg ']") All properties with href attribute ending with ". jpg"
$ ("Div#intro. Head") id= all class= "head" elements in the <div> element of "Intro"
$ (li[a:contains (' Register ')] ") Content contains the <a> elements of the Register
$ ("input[@name =bar]") Name is the <input> element of bar
$ ("input[@type =radio][@checked]") Type is the <input> element of radio
$ ("Li"). Not ("UL") No node element with UL node under Li
$ ("span[@id]") <span> element that contains the id attribute
$ ("[@id =span1]") node element with ID Span1
$ (this). Find ("a") All a elements under the current element

JQuery Selector Detailed

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.