Skip to content

Instantly share code, notes, and snippets.

@isotrope
Created September 1, 2015 12:14
Show Gist options
  • Save isotrope/3ac7a8dfcefaaa3d5d55 to your computer and use it in GitHub Desktop.
Save isotrope/3ac7a8dfcefaaa3d5d55 to your computer and use it in GitHub Desktop.
HTML .js/.no-js class
<html class="no-js">
<head>
<script>
(function (doc, classToAdd) {
doc.className = (doc.className).replace("no-js", classToAdd);
})(document.documentElement, "js");
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment