Skip to content

Instantly share code, notes, and snippets.

@SteAllan
Created February 8, 2014 18:13
Show Gist options
  • Save SteAllan/8887735 to your computer and use it in GitHub Desktop.
Save SteAllan/8887735 to your computer and use it in GitHub Desktop.
Switch the JS class on the html as soon as possible. Insert this line just after the title. (http://www.456bereastreet.com/archive/201209/tell_css_that_javascript_is_available_asap/)
<script>
document.documentElement.className = document.documentElement.className.replace(/(\s|^)no-js(\s|$)/, '$1js$2');
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment