class method Element.wrap
Element.wrap(element, wrapper[, attributes]) → Element
-
wrapper
(Element
|String
) – An element to wrapelement
inside, or else a string representing the tag name of an element to be created. -
attributes
(Object
) – A set of attributes to apply to the wrapper element. Refer to theElement
constructor for usage.
Wraps an element inside another, then returns the wrapper.
This method can be called either as an instance method or as a generic method. If calling as a generic, pass the instance in as the first argument.