Chapter 11. jQuery Quick Reference
This is a quick reference for the entire jQuery library. jQuery functions and methods are listed by category and are briefly described in the sections that follow.
This reference uses the following conventions in the method
signatures. Arguments named sel
are jQuery
selectors. Arguments named idx
are integer
indexes. Arguments named elt
or
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.
Factory Function
The 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 symbol $
is an alias for jQuery
, and you can use $()
instead of jQuery()
in each of the forms below:
jQuery(
sel
[,context
=document])Returns a new jQuery object that represents the document elements that are descendants of
context ...
Get jQuery Pocket Reference 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.