Skip to content

Instantly share code, notes, and snippets.

@piscis
Created December 16, 2011 16:17
Show Gist options
  • Save piscis/1486675 to your computer and use it in GitHub Desktop.
Save piscis/1486675 to your computer and use it in GitHub Desktop.
Removes a class from html tag via javascript, this is usefull if you enhance user experiance via JS
<script type="text/javascript">
/* CSS to JS style detector */
document.getElementsByTagName("html")[0].className = document.getElementsByTagName("html")[0].className.replace( /(?:^|\s)no\-js(?!\S)/ , '' )
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment