Skip to content

Instantly share code, notes, and snippets.

@lwcooper
Created November 8, 2012 10:52
Show Gist options
  • Save lwcooper/4038137 to your computer and use it in GitHub Desktop.
Save lwcooper/4038137 to your computer and use it in GitHub Desktop.
JS: Replace no-js with js class on HTML element using Javascript
document.documentElement.className = document.documentElement.className.replace(/(\s|^)no-js(\s|$)/, '$1js$2');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment