Appendix B. Selectors Supported by jQuery
The following table contains the selector syntax that you are able to use with jQuery's Selector API:
Selector | Description |
---|---|
Simple Selectors | |
| Selects a single element via the ID name specified in the element's id attribute. |
| Selects one or more elements by the element name, for example, |
| Selects one or more elements via a class name present in the element's |
| The universal or wildcard selector; selects all elements. |
| Selects one or more elements by chaining multiple selectors together with commas. |
Hierarchy | |
| Selects one or more elements based on an ancestral relationship. |
| Selects one or more elements based on a parent, child relationship. |
| Selects the sibling immediately following an element. |
| Selects any siblings immediately following an element. |
Basic Filters | |
| Selects the first element. |
| Selects the last element. |
| Selects elements based on what you don't want. |
| Selects only elements falling within even numbering. Since jQuery calculates position offset from zero, this actually results in the odd-numbered items being returned. Item one would be considered number zero, item two would be considered number one, and so on; so |
| Selects only elements falling ... |
Get Beginning JavaScript® and CSS Development with jQuery now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.