The jQuery HTML/CSS references are a set of methods provided by jQuery to manipulate HTML content and CSS properties of elements.
- HTML Methods: These methods allow you to create, modify, and remove HTML elements and content dynamically.
- CSS Methods: These methods enable you to get and set CSS properties, control element styles, and manage CSS classes.
jQuery HTML/CSS Methods
In the following table, we have listed all the jQuery HTML/CSS Methods −
The methods below work for both HTML and XML documents.
In the following table, we have listed all the jQuery Effect Methods −
| Sr.No. | Methods & Description |
|---|---|
| 1 | addClass()It is used to add one or more class named to the selected elements. |
| 2 | after()Inserts content after the selected elements. |
| 3 | append()Inserts content at the end of the selected elements. |
| 4 | appendTo()Inserts HTML elements at the end of the target elements. |
| 5 | attr()Gets or sets the value of an attribute for the selected elements. |
| 6 | before()Inserts content before the selected elements. |
| 7 | clone()Creates a deep copy of the selected elements. |
| 8 | css()Gets or sets the style properties of the selected elements. |
| 9 | detach()Removes the selected elements from the DOM while keeping their data and events. |
| 10 | empty()Removes all child nodes from the selected elements. |
| 11 | hasClass()Checks if any of the selected elements have a specified class. |
| 12 | height()Gets or sets the height of the selected elements. |
| 13 | html()Gets or sets the HTML contents of the selected elements. |
| 14 | innerHeight()Gets the inner height (includes padding) of the selected elements. |
| 15 | innerWidth()Gets the inner width (includes padding) of the selected elements. |
| 16 | innerAfter()Inserts HTML elements after the selected elements. |
| 17 | innerBefore()Inserts HTML elements before the selected elements. |
| 18 | offset()Gets or sets the offset (position relative to the document) of the selected elements. |
| 19 | offsetParent()Gets the closest positioned ancestor element. |
| 20 | outerHeight()Gets the outer height (includes padding, border, and optionally margin) of the selected elements. |
| 21 | outerWidth()Gets the outer width (includes padding, border, and optionally margin) of the selected elements. |
| 22 | position()Gets the current position of the selected elements relative to the offset parent. |
| 23 | prepend()Inserts content at the beginning of the selected elements. |
| 24 | prependTo()Inserts HTML elements at the beginning of the target elements |
| 25 | prop()Gets or sets the properties of the selected elements. |
| 26 | remove()Removes the selected elements from the DOM. |
| 27 | removeAttr()Removes an attribute from each element in the set of matched elements. |
| 28 | removeClass()Removes one or more class names from the selected elements. |
| 29 | removeProp()Removes a property for the set of matched elements. |
| 30 | replaceAll()Replaces the target elements with the selected elements. |
| 31 | replaceWith()Replaces the selected elements with new content. |
| 32 | scrollLeft()Gets or sets the horizontal scroll position of the selected elements. |
| 33 | scrollTop()Gets or sets the vertical scroll position of the selected elements. |
| 34 | text()Gets or sets the text content of the selected elements. |
| 35 | toggleClass()Adds or removes one or more class names from the selected elements. |
| 36 | unwrap()Removes the parent element of the selected elements. |
| 37 | val()Gets or sets the value of form elements. |
| 38 | width()Gets or sets the width of the selected elements. |
| 39 | wrap()Wraps an HTML structure around each selected element. |
| 40 | wrapAll()Wraps an HTML structure around all selected elements. |
| 41 | wrapInner()Wraps an HTML structure around the content of each selected element. |
Leave a Reply