Appendix F (^) ❘ 531
bapp06.indd 02/17/2015 Page 531
wrap(function()) A callback function that returns content that
wraps the selected elements. The content
returned by the callback function can be an
HTML snippet, a DOM element reference, 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.
Note the distinction that the element must
be capable of wrapping another element—
for example, you couldn’t use an
element to wrap another element.
jQuery
wrapAll(wrappingElement) Wraps all the selected elements. The element
used to wrap each element can be a selector
referencing an element, an HTML snippet, a
DOM element object reference, or a jQuery
object.
Note the distinction that the element must
be capable of wrapping another element—
for example, you couldn’t use an
element to wrap another element.
jQuery
wrapInner(wrappingElement) Wraps the inner contents of each selected
element. The element used to wrap each
element can be a selector referencing an
element, an HTML snippet, a DOM element
object reference, or a jQuery object.
Note the distinction that the element must
be capable of wrapping another element—
for example, you couldn’t use an
element to wrap another element.
jQuery
wrapInner(function()) A callback function that returns content that
wraps the selected elements. The content
returned by the callback function can be an
HTML snippet, a DOM element reference, 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.
Note the distinction that the element must
be capable of wrapping another element—
for example, you couldn’t use an
element to wrap another element.
jQuery
http://www.it-ebooks.info
elliott
(Elliott)
#1