jQuery Reference Manual - Document Operations

jQuery Document Manipulation Methods

These methods are applicable to both XML and HTML documents, except for: html().

Method Description
addClass() Add the specified class name to the matched elements.
after() Insert content after the matched elements.
append() Insert the content specified by the parameter at the end of each element in the matched element collection.
appendTo() Insert each element of the matched element collection at the end of the target.
attr() Set or return the attributes and values of the matched elements.
before() Insert content before each matched element.
clone() Create a copy of the matched element collection.
detach() Remove the matched element collection from the DOM.
empty() Remove all child nodes from the matched element collection.
hasClass() Check if the matched elements have the specified class.
html() Set or return the HTML content of the matched element collection.
insertAfter() Insert the matched elements after another specified element collection.
insertBefore() Insert the matched elements before another specified element collection.
prepend() Insert the content specified by the parameter at the beginning of each element in the matched element collection.
prependTo() Insert each element of the matched element collection at the beginning of the target.
remove() Remove all matched elements.
removeAttr() Remove specified attributes from all matched elements.
removeClass() Remove all or specified classes from all matched elements.
replaceAll() Replace all matched elements with the matching elements.
replaceWith() Replace the matched elements with new content.
text() Set or return the content of the matched elements.
toggleClass() Add or remove a class from the matching elements.
unwrap() Remove and replace the parent element of the specified element.
val() Set or return the value of the matching elements.
wrap() Wrap matching elements with specified content or element.
wrapAll() Wrap all matching elements with specified content or element.
wrapinner() Wrap each matching element's child content with specified content or element.