DOM Insertion, Inside

jQuery

Category: 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 or set the HTML contents of every matched element.

.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, or set the text contents of the matched elements.