Skip to content

Instantly share code, notes, and snippets.

@astromac
Created January 8, 2014 23:00
Show Gist options
  • Save astromac/8326279 to your computer and use it in GitHub Desktop.
Save astromac/8326279 to your computer and use it in GitHub Desktop.
Removes no-js class
// Remove no-js class
var tag = document.getElementsByTagName('html')[0];
if (tag.className.length > 0 && /no-js/i.test(tag.className)) {
tag.className = tag.className.replace(/\s?no-js\s?/i, '');
} else {
tag.className = '';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment