jQuery — the jQuery library
This is a quick reference for the jQuery library. See Chapter 19 for complete details on the library and for
examples of its use. This reference page is organized and formatted
somewhat differently than the other pages in this reference section.
It uses the following conventions in the method signatures.
sel are jQuery selectors.
idx are integer indexes.
elts are document elements or array-like
objects of document elements. Arguments named
f are callback functions and nested
parentheses are used to indicate the arguments that jQuery will pass
to the function you supply. Square brackets indicate optional
arguments. If an optional argument is followed by an equals sign and
a value, that value will be used when the argument is omitted. The
return value of a function or a method follows the close parenthesis
and a colon. Methods with no return value specified return the
jQuery object on which they are invoked.
jQuery function is a
namespace for a variety of utility functions, but it is also the
factory function for creating jQuery objects.
jQuery() can be invoked in all of the ways
shown below, but it always returns a jQuery object that represents a
collection of document elements (or the Document object itself). The
$ is an alias for
jQuery, and you can use
$() instead of
jQuery() in each of the forms