JQuery Selector
Selector instance Selection
* $ ("*") all elements
#id $ ("#lastname") id= elements of "LastName"
. Class $ (". Intro") All Elements of class= "Intro"
Element $ ("P") all <p> elements
. Class.class $ (". Intro.demo") All class= "Intro" and Class= "demo" Elements
: First $ ("P:first") <p> element
: Last $ ("P:last") Final <p> element
: Even $ ("Tr:even") all even <tr> elements
: Odd $ ("tr:odd") all odd <tr> elements
: EQ (Index) $ ("UL Li:eq (3)") in the list of fourth elements (index starting from 0)
: GT (NO) $ ("UL li:gt (3)") lists elements with index greater than 3
: LT (No) $ ("UL Li:lt (3)") lists elements with index less than 3
: Not (selector) $ ("Input:not (: Empty)") all input elements that are not empty
: Header $ (": Header") all heading elements
: Animated all animated elements
: Contains (text) $ (": Contains (' W3school ')") contains all elements of the specified string
: Empty $ (": Empty") all elements of No Child (element) node
: Hidden $ ("P:hidden") all hidden <p> elements
: Visible $ ("table:visible") for all the viewable tables
S1,S2,S3 $ ("Th,td,.intro") all elements with a matching selection
[Attribute] $ ("[href]") all elements with href attribute
[Attribute=value] $ ("[href= ' # ']") all href attribute values equal to "#" elements
[Attribute!=value] $ ("[href!= ' # ']") all href attribute values are not equal to "#" elements
[Attribute$=value] $ ("[href$=. jpg]") all href attribute values contain elements that end with ". jpg"
: Input $ (": input") all <input> elements
: Text $ (": Text") All type= "text" <input> elements
:p Assword $ (":p assword") all type= "password" <input> elements
: Radio $ (": Radio") All Type= "Radio" <input> elements
: CheckBox $ (": checkbox") all the <input> elements of the type= "checkbox"
: Submit $ (": Submit") all type= "Submit" <input> elements
: Reset $ (": Reset") for all type= "reset" <input> elements
: Button $ (": Button") for all type= "button" <input> elements
: Image $ (": Image") all the <input> elements of the type= "image"
: File $ (": File") all the <input> elements of the type= "file"
: Enabled $ (": Enabled") All active input elements
:d isabled $ (":d isabled") all disabled input elements
: Selected $ (": Selected") All selected input elements
: Checked $ (": Checked") All selected input elements
jquery effect function
Method description
Animate () applies a "custom" animation to the selected element
Clearqueue () removes all queued functions from the selected element (still not running)
Delay () Setting delays for all queued functions (still not running) on the selected element
Dequeue () Run the next queued function of the selected element
FadeIn () fade in selected element to completely opaque
FadeOut () fades out of selected elements to completely opaque
FadeTo () weakens the selected element to a given opacity
Hide () hides the selected element
Queue () Displays the queued function of the selected element
Show () displays the selected element
Slidedown () swipe to show selected elements by adjusting the height
Slidetoggle () Toggle for sliding and sliding display of selected elements
Slideup () swipe to hide selected elements by adjusting the height
Stop () stops the animation from being run on the selected element
Toggle () Toggles the selected element to be hidden and displayed
jquery selector and jquery effect function