I have some trivial JavaScript to effect a style change:
sel = document.getElementById(\'my_id\');
sel.className = sel.className.replace(/item-[1-9]-selected
danorton solution didn't work for me. I had some really weird problems where webkit wouldn't draw some elements at all; where text in inputs wasn't updated until onblur; and changing className would not result in a redraw.
My solution, I accidentally discovered, was to add a empty style element to the body, after the script.
...
...
That fixed it. How weird is that? Hope this is helpful for someone.