title: How can I reliably set the class attr w/JavaScript on IE, FF, Chrome, etc.?
body: <p>I am using the below JS code in order to change the class when a link is clicked.</p>
  
  <pre><code>document.getElementById("gifts").setAttribute("class", "gkvSprite selected");
  </code></pre>
  
  <p>This is not working in IE but it does in FF and Chrome. Then I changed the code to:</p>
  
  <pre><code>document.getElementById("gifts").setAttribute("className", "gkvSprite selected");
  </code></pre>
  
  <p>Then it worked in IE, but stopped working in FF and Chrome.</p>
  
  <p>Could someone please help me out here?</p>