JS DOM: Change HTML style attribute (for CSS)
Get style
node.style.cssPropertyReturn the property value, or undefined if it doesn't exist.
Set style
-
node.style.cssProperty=value -
- Set CSS property.
- Return value.
- If the property is not a standard CSS property, it's not added.
example JS DOM: Change CSS
JavaScript DOM, Change CSS
DOM Element Methods
Get node
- JS DOM: Get Element by ID, Name, Class etc
- JS DOM: Get Current Script Element
- JS DOM: Get Parent, Child, Sibling
Loop thru nodes
Attributes
- JS DOM: Element Attribute Methods
- JS DOM: Class Attribute (get add remove toggle)
- JS DOM: Change HTML style attribute (for CSS)