jQuery DOM Methods

Last Updated:

jQuery DOM Methods

The following are the list of DOM methods available in jQuery.

MethodExplanation
addBack() Adds the previous set of elements on the stack to the current set.
after() Inserts specified content after the selected elements.
append() Inserts specified content at the end of the selected elements.
appendTo() Inserts specified content at the end of the selected elements.
before() Inserts specified content before the selected elements.
detach() Removes the set of matched elements from the DOM.
empty() Removes all child nodes of the set of matched elements from the DOM.
html() Gets or Sets the html content (innerHTML) of the selected elements.
insertAfter() Inserts HTML elements after the selected elements.
insertBefore() Inserts HTML elements before the selected elements.
prepend() Inserts specified content at the beginning of the selected elements.
prependTo() Inserts specified content at the beginning of the selected elements.
pushStack() Adds a collection of DOM elements onto the jQuery stack.
remove() Removes the set of matched elements from the DOM.
replaceAll() Replaces selected elements with new HTML elements.
replaceWith() Replaces selected elements with new content.
text() Gets or Sets the text content (innerText) of the selected elements.
wrap() Wraps an HTML structure around each element in the set of matched elements.
wrapAll() Wraps an HTML structure around all elements in the set of matched elements.
wrapInner() Inserts an HTML structure around the content of each inner elements.
unwrap() Removes the parent element of the selected elements.

Share this Page

Meet the Author