Skip to content

Instantly share code, notes, and snippets.

@patocallaghan
Created March 8, 2012 11:17
Show Gist options
  • Save patocallaghan/2000522 to your computer and use it in GitHub Desktop.
Save patocallaghan/2000522 to your computer and use it in GitHub Desktop.
Replacing "no-js" class on HTML tag with "js" (similar to how Modernizr does it)
(function(doc, classToAdd){
doc.className = (doc.className).replace("no-js", classToAdd);
})(document.documentElement, "js");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment