DOM manipulation methods
The DOM manipulation methods are discussed in detail in Chapter 5, Manipulating the DOM.
Attributes and properties
Manipulation method | Description |
---|---|
| Gets the attribute named |
| Sets the attribute named |
| Sets the attribute named |
| Sets attribute values given as key-value pairs. |
| Removes the attribute named |
| Gets the property named |
| Sets the property named |
| Sets the property named |
| Sets property values given as key-value pairs. |
| Removes the property named |
| Adds the given class to each matched element. |
| Removes the given class from each matched element. |
| Removes the given class if present, and adds it if not, for each matched element... |