jQuery is a JavaScript library for manipulating the DOM.
Some beginning tips:
$is interchangeable withjQuerymuch of the time.
Selectors
To select elements, we can use $('selection-text');, where selection text can vary:
- Element selector: changes nothing, will select all HTML elements
- Class selector: prefix with a period
. - ID selector: prefix with a hashtag
#
Resources
- jQuery API documentation
- jQuery in Action, by Bear Bibeault, Yehuda Katz, and Aurelio De Rosa