Skip to content

Instantly share code, notes, and snippets.

@kevinthompson
Created July 16, 2011 00:27
Show Gist options
  • Save kevinthompson/1085836 to your computer and use it in GitHub Desktop.
Save kevinthompson/1085836 to your computer and use it in GitHub Desktop.
Hiding JavaScript-Dependent Content
<!DOCTYPE html>
<html>
<head>
<title>Hiding JavaScript-Dependent Content</title>
<script type="text/javascript">
var html = document.getElementsByTagName('html')[0];
html.className = (html.className != '' ? html.className + ' ' : '') + 'js';
</script>
</head>
.js .slide { display:none; }
.js .slide:first-child { display:block; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment