DOM Insertion, Inside
These methods allow us to insert new content inside an existing element.
-
.append()
Insert content, specified by the parameter, to the end of each element in the set of matched elements.
-
.appendTo()
Insert every element in the set of matched elements to the end of the target.
-
.html()
Get the HTML contents of the first element in the set of matched elements.
-
.prepend()
Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
-
.prependTo()
Insert every element in the set of matched elements to the beginning of the target.
-
.text()
Get the combined text contents of each element in the set of matched elements, including their descendants.