1. Reference For jQuery HTML Methods
This comprehensive reference provides a complete guide to jQuery's HTML manipulation methods. These powerful functions enable you to dynamically modify the content and structure of your web pages, from adding and removing HTML elements to altering their attributes and content.
Following is the complete alphabetical list of jQuery HTML methods used to manipulate the structure and content of a web page.
Method | Description |
addClass() | Adds one or more class names to selected elements |
after() | Inserts content after selected elements |
append() | Inserts content at the end of selected elements |
appendTo() | Inserts HTML elements at the end of selected elements |
before() | Inserts content before selected elements |
clone() | Makes a copy of selected elements |
detach() | Removes selected elements (keeps data and events) |
empty() | Removes all child nodes and content from selected elements |
html() | Sets or returns the content of selected elements |
insertAfter() | Inserts HTML elements after selected elements |
insertBefore() | Inserts HTML elements before selected elements |
prepend() | Inserts content at the beginning of selected elements |
prependTo() | Inserts HTML elements at the beginning of selected elements |
remove() | Removes the selected elements (including data and events) |
removeAttr() | Removes one or more attributes from selected elements |
removeClass() | Removes one or more classes from selected elements |
removeProp() | Removes a property set by the prop() method |
replaceAll() | Replaces selected elements with new HTML elements |
replaceWith() | Replaces selected elements with new content |
text() | Sets or returns the text content of selected elements |
toggleClass() | Toggles between adding/removing one or more classes from selected elements |
unwrap() | Removes the parent element of the selected elements |
val() | Sets or returns the value attribute of the selected elements (for form elements) |
wrap() | Wraps HTML element(s) around each selected element |
wrapAll() | Wraps HTML element(s) around all selected elements |
wrapInner() | Wraps HTML element(s) around the content of each selected element |