Appendix F. Manipulating Content
Method/Property | Description | Return Value |
---|---|---|
HTML | ||
| Returns the HTML contents, or | String |
| Sets the HTML contents of every selected element. This method does not work on XML documents, but does work on XHTML documents. | jQuery |
Text | ||
| Returns the text content of each selected element. | String |
| Sets the text content of each selected element. HTML source code will not be rendered. | jQuery |
Inserting Inside | ||
| Appends the specified content to the inside of every selected element. | jQuery |
| Appends all of the selected elements to the elements specified by the | jQuery |
| Prepends the specified content to the inside of each selected element. | jQuery |
| Prepends all of the selected elements to the elements specified by the | jQuery |
Inserting Outside | ||
| Inserts the specified content after each selected element. | jQuery |
| Inserts the selected elements after the elements specified by the | jQuery |
| Inserts the specified content before each selected element. | jQuery |
| Inserts the selected elements before the selectors specified by the | jQuery |
Inserting Around | ||
| Wraps each selected element with the specified HTML content. | jQuery |
| Wraps each selected ... |
Get Beginning JavaScript® and CSS Development with jQuery now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.