Hi can someone find what's wrong with this code? It's a Q/A page, where all the answers are hidden at first, then an answer is displayed when a question is clicked (after hiding all other displayed answers). It's not working at all.
JS:
Code:
<!--Q&A text-->
<script type="text/javascript">
$(document).ready(function() {
$('.answer').hide();
$('.question').click(function() {
var $nextDiv = $(this).next();
var $visibleSiblings = $nextDiv.siblings('div:visible');