Keith Zantow ff828fbac2
Skip package-lock.json and yarn.lock in node_modules #431 (#485)
Signed-off-by: Keith Zantow <kzantow@gmail.com>
2021-08-20 13:50:28 -04:00

13 lines
399 B
JavaScript

var on = require('dom-event');
var insertCss = require('./');
document.querySelector('body').innerHTML = '<h1>insert-css example</h1><button id="blue">blue</button><button id="red">red</button>';
on(document.querySelector('#blue'), 'click', function() {
insertCss('body{background: blue}');
});
on(document.querySelector('#red'), 'click', function() {
insertCss('body{background: red}');
});