I'm trying to create a sliding FAQ menu using jQuery, but I'm getting an error that states the the hide() is null. I've tried it in Chrome and Firefox on Mac and Firefox on Win. Here's the code:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.hide').hide();
$('h5').click(function(){
$(this).next().slideToggle("slow");
return false;
});
});
And here is the HTML:
<a href="#" ><h5 >The Heading </h5></a><br />
<div class="hide">
The content.
</div>
I've spent the last three hours pouring over books and tutorials online and everything looks right, but apparently not. :P
Any help is much appreciated.