document.getElementById("gD" + gDay + gMonth + gYear).setAttribute("class", "gDay gDayHover");
This works fine in all modern browsers, unfortunately for me it needs to work in older versions. I’m using IE8’s compatibility mode, and it doesn’t seem to cope with this piece of code.
It’s getting the element fine, but not changing it’s class. Any ideas?
You might want to have a look at the
classNameproperty. This should work fine in IE6 and above.