I have a series of divs that share a class for assorted reasons (and a number of divs that get created via code at other points).
I've tried to find answers, but all rely on the class being in the stylesheet (if there even is one), which is something that doesn't happen in this case or that alters existing elements instead of the rules themselves.
So I need to do something like...
var add_to_styles('myClassName');
myClassName.cssText = "color: red;"
And have all divs that get created (both before and after the script running) that have the class
<div class="myClassName">I should be red</div>
To come out with the rule change. But I haven't found anything like this.