-
Book Overview & Buying
-
Table Of Contents
Learning jQuery - Fourth Edition - Fourth Edition
The jQuery factory function $() is used to find elements on the page to work with. This function takes a string composed of CSS-like syntax, called a selector expression. Selector expressions are discussed in detail in Chapter 2, Selecting Elements.
|
Selector |
Matches |
|---|---|
|
|
All elements. |
|
|
The element with the given ID. |
|
|
All elements of the given type. |
|
|
All elements with the given class. |
|
|
Elements that are matched by |
|
|
Elements |
|
|
Elements |
|
|
Elements |
|
|
Elements
|
|
Selector |
Matches |
|---|---|
|
|
Elements
that are the |
|
|
Elements that are an even child of their parent element (1-based). |
|
|
Elements which are an odd child of their parent element (1-based... |
Change the font size
Change margin width
Change background colour