Skip to content

Instantly share code, notes, and snippets.

@fongreecss
Created May 2, 2016 16:35
Show Gist options
  • Save fongreecss/3f9516ab65d4ea688f8f9502d98564ab to your computer and use it in GitHub Desktop.
Save fongreecss/3f9516ab65d4ea688f8f9502d98564ab to your computer and use it in GitHub Desktop.
converts html classname "no-js" to "js" if javascript is enabled
var html = document.documentElement;
html.className = html.className.replace(/\bno-js\b/g, 'js');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment