jquery Learning Notes

Source: Internet
Author: User

1. Base syntax: $ (selector). Action ()

2. Base Selector

1) All Seletor    $ ("*")2) Class Selector    $ (". Class")3) Element Selector    $ ("element")4) ID Selector    $ ("#id")5) Multiple Selector    $ ("Selector1, Selector2, Selectorn")
View Code

3. Property Selector

1) Attribute Contains Prefix Selector [name|= "value")]    $("[attribute|= ' value ']") quotation marks are optional2) Attribute COntains Selector [name*= "value")] $ ("attribute*= ' value ']")3) Attribute Contains Word Selector [name~= "Value"]    $("[attribute~= ' value ']")4) Attribute Equal withSelector[name= "Value"]    $("[attribute= ' value ']")5) Attribute not Equal Selector [name!= "Value"]    $("[attribute!= ' value ']")6) Attribute Ends with Selector [name$= "Value"]    $("[attribute$= ' value ']")7) Attribute starts with Selector [name^= "Value"]    $("[attribute^= ' value ']")8) has Attribute Selector [name] $ ("[Attribute]")9) Multiple Attribute Selector [name1= "value1" [name2= "Vallue2"]    $("[Attributefilter1][attributefilter2][attributefiltern]")
View Code

4. Basic Filter

1): Animated Selector $ (": Animated")2): eq () Selector a) $ (": EQ (Index)") b) $ (": eq (-index)")3): Even Selector $ (": Even")4): First Selector $ (": First")5): Focus Selector $ (": Focus")6): Header Selector $ (": Header")7): Last Selector $ (": Last")8): GT () selector a) $ (": GT (Index)") b) $ (": GT (-index)")9): LT () selector a) $ (": LT (Index)") b) $ (": Lt (-index)")10): Not () selector $ (": Not (selector)")
View Code

jquery Learning Notes

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.