amitabhaghosh197
7/18/2015 - 7:01 PM

jQuery selectors

jQuery selectors

* Matches any element.
E Matches all elements with tag name E.
E F Matches all elements with tag name F that are descendants of E.
E>F Matches all elements with tag name F that are direct children of E.
E+F Matches all elements with tag name F that are immediately preceded by sibling E.
E~F Matches all elements with tag name F preceded by any sibling E.
E.C Matches all elements with tag name E with class name C. Omitting E is the same as
*.C.
E#I Matches all elements with tag name E with the id of I. Omitting E is the same as *#I.
E[A] Matches all elements with tag name E that have attribute A of any value.
E[A=V] Matches all elements with tag name E that have attribute A whose value is exactly V.
E[A^=V] Matches all elements with tag name E that have attribute A whose value starts with V.
E[A$=V] Matches all elements with tag name E that have attribute A whose value ends with V.
E[A!=V] Matches all elements with tag name E that have attribute A whose value doesn’t match
the value V, or that lack attribute A completely.
E[A*=V] Matches all elements with tag name E that have attribute A whose value contains V.