|
If you are trying to get generated CSS into the page can you not use the methods of the stylesheet object:
For IE:
document.styleSheets[0].addRule('h1,'color:red');
For Moz:
document.stylesheet[0].insertRule("h1 {color:red}", 0);
Or if you want to change the rule dynamically you can use:
document.styleSheets[i].rules[j].style.setProperty('color','red',null);
Which is standard, but not as reliable (at least in IE) as:
document.styleSheets[i].rules[j].style.color = '12pt';
Oh.... rules is IE only for Moz you have to use cssRules instead
|