This is an old revision of the document!
This page is somewhere for me to note down the most important jQuery concepts while I'm learning it. For a proper reference, see the official API reference.
The example HTML page below shows how to load jQuery and install a simple handler:
This simple example waits until the DOM is ready and then installs a click handler on all
<a> tags on the page to pop up an alert box when clicked. The
read() handler is widely used, as it doesn't make sense to manipulate the DOM until it's fully instantiated.
This example can be decomposed into its elements:
| || This adds a handler to be called when the DOM is fully loaded. It takes a callback function as its parameter, in this case (and frequently) an anonymous function defined in-place. Note that
| || This is a jQuery selector, returning a jQuery object representing all
| || Installs a click handler on the specified set of elements, similar to the