jquery Selector-Basic filter Selector

Source: Internet
Author: User

Basic Filter Selector

1 Basic Filter Selector to find the desired DOM element more quickly

2 Description of the basic filter selector

$ (": First") to match one element

$ (": Last") matches the final element

$ (": Not (selector)") is used to filter the selector, select all elements to take out does not match the given selector element

$ (": EQ (Index)") Select an element of index value in the matching collection

$ (": GT (Index)") Select any element in the matching collection that is greater than the given index value

$ (": even") Select an element with an even number of index values, starting with 0 counting

$ (": Odd") Select an element with an odd index value, counting from 0

$ (": LT (Index)") Select the element that matches all the index values in the collection that are less than the given index parameter

$ (": Header") Select all heading elements

$ ("Lang (language)") Select all elements of the development language

$ (": Root") Select the root element of the document

$ ("animated") selects all elements that are performing an animation effect

3 GT Filter the paragraph from the next start of the specified index, GT (1) actually starting from 2

4:eq (),: LT (),: GT (),: Even, odd filter the collection element of the preceding match expression, and filter further based on the previously matched element

5 jquery collections are indexed starting from 0

6 The Content Filter Selector is a content-filtering selector that describes filtering

7 Content Filter Selector description Filter

$ (": Contains (text)") Select all elements that contain the specified text

$ (":p arent") Select all elements that contain child elements or text

$ (": Empty") Select all elements that have no child elements (contain text nodes)

$ (": Has (selector)") Select an element that contains at least the elements of the specified selector

8:contanins and: Has all have a look-up meaning, but contains finds the element that contains the specified text, has found the element that contains the specified element

9:contains matching text is included in the element's child elements that are compliant

10:parent with: Empty is the opposite, and the child element involved contains the text node

jquery Selector-Basic filter 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.