DOM Insert Around Elements

Listed below the DOM methods that allows to insert a data around the exisiting elements.

Wrap .wrap()

wrap() method is used to wrap a specified HTML element around each of the selected element.

Unwrap: .unwrap()

unwrap() method is contrary to the wrap method which removes the parent element which is around the selected element.

Wrapall: .wrapAll()

wrapAll() method is used to wrap all the specified HTML elements into a single wrapper element.

Wrapinner: .wrapInner()

wrapinner() method is used to wrap the specified elements of HTML around the content of each element that is selected.



Ask Questions

Ask Question