document.getElementById not working in IE
- by Alloi
Hi,
I am using the below js code in order to change the class when a link is clicked.
document.getElementById("gifts").setAttribute("class", "gkvSprite selected");
This is not working in IE but it does in FF and Chrome
Then I changed the code to :
document.getElementById("gifts").setAttribute("className", "gkvSprite selected");
Then it worked in IE stopped working in FF and Chrome.
Could someone please help me out here?
Thanks in Advance
Alloi