document.getElementById("gD" + gDay + gMonth + gYear).classList.add("gDayHover");
While this code works perfectly in modern browsers, I am facing an issue with older versions. Specifically, when running IE8's compatibility mode, the code doesn't seem to handle it properly.
The element is being retrieved successfully, but the class is not getting changed. Any suggestions on how to fix this?