(^528) ❘ APPENDIX F MORE CONTENT MANIPULATION
bapp06.indd 02/17/2015 Page 528
append(function()) Executes a function that returns content to
be appended. The content returned by the
function can be an HTML string, a DOM ele-
ment object reference, an Array of DOM ele-
ment object references, or a jQuery object.
As with most jQuery callback functions, this
refers to the current element within the call-
back function, and the callback function is
provided with the argument list: offset,
html.
jQuery
appendTo(selector) Appends all the selected elements to the ele-
ments specifi ed by the selector argument.
jQuery
before(content[,
content])
Inserts the specifi ed content before each
selected element. One or more content
items can be specifi ed for inclusion and will
be inserted sequentially. Content items can
be an HTML snippet, a DOM element object
reference, or a jQuery object.
jQuery
before(function()) Executes a function that returns content to
be inserted before the selected element(s).
The content returned by the function can be
an HTML string, a DOM element object refer-
ence, an Array of DOM element object refer-
ences, or a jQuery object.
As with most jQuery callback functions, this
refers to the current element within the call-
back function, and the callback function is
provided with the argument list: offset,
html.
jQuery
clone([withDataAndEvents]) Clones the selected elements; returns the
jQuery object including the clones you cre-
ated. If the optional withDataAndEvents
argument is true, then events and data are
cloned as well.
jQuery
(continued)
http://www.it-ebooks.info
elliott
(Elliott)
#1