Skip to content

Instantly share code, notes, and snippets.

@tjFogarty
Created August 26, 2013 11:31
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 tjFogarty/6340532 to your computer and use it in GitHub Desktop.
Save tjFogarty/6340532 to your computer and use it in GitHub Desktop.
Assuming the HTML element has a class of 'no-js', this will swap it for 'js'. Should be placed in the header.
var el = document.getElementsByTagName('html')[0];
el.className = el.className.replace('no-js', 'js');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment