Namespace: Manipulation

Manipulation

All of the methods in this section manipulate the DOM in some manner. A few of them simply change one of the attributes
of an element (also listed in the Attributes category), while others set an element's style properties (also listed in the CSS category).

Methods


<static> html()

Get the HTML contents of the first element in the set of matched
elements or set the HTML contents of every matched element.

Returns:
Type
array
Example
DOM.get('a').html(); // <div id="A">A</div>

<static> prepend()

Insert content, specified by the parameter, to the beginning of each
element in the set of matched elements.

Example
DOM.get('b').prepend(DOM.get('a'));

<static> text()

Get the text contents of the first element in the set of matched
elements or set the HTML contents of every matched element.

Returns:
Type
array
Example
DOM.get('a').text(); // A