Skip to content

Instantly share code, notes, and snippets.

@rodi01
Created February 1, 2012 05:45
Show Gist options
  • Save rodi01/1715350 to your computer and use it in GitHub Desktop.
Save rodi01/1715350 to your computer and use it in GitHub Desktop.
Adding hasJS Class When JavaScript Is Available
.hasJS .module {
display: none;
}
<script type="text/javascript">
document.getElementsByTagName('html')[0].className = 'hasJS';
</script>
jQuery(function($) {
$('body').addClass('hasJS');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment