Is there a way to add and remove or disable a CSS rule in JavaScript? Here is the CSS:
#myElement *, #myElement *:before {
outline:1px dotted red;
}
Here is what I have so far:
var myCSS = "#myElement *, #myElement *:before {outline:1px dotted red;}";
// document.addCSS(myCSS);
EDIT:
I can't add the rules to the HTML page and toggle between them. I need to be able to create a rule in JavaScript after the page loads and also switch it on and off in JS.