Skip to content

Instantly share code, notes, and snippets.

@mojaray2k
Created August 8, 2013 20:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mojaray2k/6188275 to your computer and use it in GitHub Desktop.
Save mojaray2k/6188275 to your computer and use it in GitHub Desktop.
Setting Class Attributes in IE and All Browsers
//setattribute.js
//Setting Class Attributes in IE and all Browsers
document.getElementById("hotel-title-area-wrapper").setAttribute("class","second");
//This works in non IE broswers
document.getElementById("hotel-title-area-wrapper").className="First";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment