(^502) ❘ APPENDIX C SELECTING, TRAVERSING, AND FILTERING
bapp03.indd 02/17/2015 Page 502
add(html) Adds one or more elements to the selection
by virtue of an HTML fragment string that
is parsed and converted into DOM element
object references.
jQuery
add(selection) Adds one or more elements to the selection
by virtue of an existing selection reference.
jQuery
add(selector, context) Adds one or more elements to the selection
by virtue of a selector. A context provides
the relative point in the document where the
selector should be carried out.
jQuery
addBack([selector]) Adds a set or selection of elements to the
current selection; this can optionally be fi l-
tered by a selection.
jQuery
andSelf() Adds the previous selection to the current
selection. Deprecated in jQuery 1.8.
jQuery
children([selector]) Makes a selection within the context of the
matched elements’ children. The selector
argument is optional; to select all children
of all the selected elements, simply omit the
selector argument.
jQuery
closest(selector[,
context])
Similar to the parents() method, except this
method begins with the element itself, rather
than its parent, and either matches the ele-
ment itself or travels up the DOM to fi nd the
right ancestor.
If the optional context argument is provided,
it provides a DOM element within which a
matching element can be found.
jQuery
closest(selection) The closest() method may also use an
existing selection reference.
jQuery
closest(element) The closest() method may also use a DOM
element object reference directly.
jQuery
contents() Gets children elements of each matched ele-
ment, including text and comment nodes,
which are normally excluded from jQuery
method operations.
jQuery
(continued)
http://www.it-ebooks.info
elliott
(Elliott)
#1