DOM Insertion, Outside

jQuery

Category: DOM Insertion, Outside


These methods allow us to insert new content outside an existing element.

.after()

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

.before()

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

.insertAfter()

Insert every element in the set of matched elements after the target.

.insertBefore()

Insert every element in the set of matched elements before the target.