I'm trying to edit the cssText property of a cssRule. I've seen it done often:
Usually its done using : cssText.replace( ... ).
It seems to work for everybody except me. Can someone please explain me why the following will not work :
var cssText = document.styleSheets[1].cssRules[0].cssText;
document.styleSheets[1].cssRules[0].cssText = cssText.replace( "red", "yellow" );
Fiddle is here: http://jsfiddle.net/KbkFH/3/