Skip to content

Instantly share code, notes, and snippets.

@christurnertv
Created March 19, 2014 21:05
Show Gist options
  • Save christurnertv/9651247 to your computer and use it in GitHub Desktop.
Save christurnertv/9651247 to your computer and use it in GitHub Desktop.
<html>
<head>
<title>Exampe jQuery Page</title>
<style>
.invisible {
display: none;
}
</style>
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
</head>
<body>
<h1>Park FAQ</h1>
<dl>
<dt>Park 1 Question</dt>
<dd>Answer</dd>
<dt>Park 2 Question</dt>
<dd>Answer</dd>
<dt>Park 3 Question</dt>
<dd>Answer</dd>
</dl>
<script>
$('dd').addClass('invisible');
$('dt').click(function () {
$(this).next().toggleClass('invisible');
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment