jQuery SelectorsOrder by Alphabet
This section contains a comprehensive list of selectors belonging to the latest jQuery JavaScript library. All the selectors are grouped into categories.
Basic Selectors
| Selector | Example | Description |
|---|---|---|
* | $("*") | Selects all elements. |
#id | $("#foo") | Selects all elements with the id="foo". |
.class | $(".bar") | Selects all elements with the class="bar". |
element | $("p") | Selects all <p> elements. |
selector1, selector2, selectorN | $("h1, p.bar, span") | Selects all <h1> and <span>, but only that <p> elements that has the class="bar". |