domstyle
DOM manipulation of the style property
Installation
$ npm install --save domstyle
Examples
Node
var domstyle = document; ... ;
Client side
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>domstyle</title> <script src="domstyle.js"></script></head><body> <p id="helloWorldId">Hello World!</p> <script> var domstyle = ; ; ; console; // {color: "white"} console; // {font-size: "25px"}</script></body></html>
Methods
Get
Syntax
;
attr1
,attr2
- style attributes.
Example
; // result: { color: ..., font-size: ... }
Set
Syntax
;
attr1
,attr2
- style attributes;value1
,value2
- new values of the attributes.
Example
;