related question with unsatisfactory answers: Changing CSS values with Javascript
Here is what I want to do. I would like to be able to set the page element class for some value and activate its browser, for example the td table whose background will be set to rgb(255*(cos(time)*.5+.5),0,0).
I can easily do this for one item by setting a timer. But I might want several elements to have this property, and keeping track of the timer for each of them is a great idea.
So what I would like to do is to be able to change the CSS value from javascript.
I am looking at the code here and it seems to me that it is too hard for me to use with a timer. In appearance, every call I make to a type function changecssinvolves adding an entire CSS rule for each individual stylesheet. This will mainly foul the style sheets inside and will probably lead to a memory leak if I call it in a loop every 33 ms.
So, I'm looking for a solution that will allow me to reset the rgb color parameter in a css entry corresponding to a specific class. And change it. In this case, I really do not need to retrieve the original settings. It can be done? I would like to support IE9, if possible, although IE 6,7,8 is already very silent about my project, and I abandoned them.