Code:
<script type="text/javascript">
$(document).ready(function() {
$('div.accordion> ul ul').hide();
$('div.accordion> ul li a').click(function() {
$(this).next('ul').slideToggle('fast').parent('li').siblings('li').children('ul:visible').slideUp('fast'); //THIS IS WHERE I'M STUCK
});
});
</script>
Code:
$(this).next('ul').slideToggle('fast').parent('li').siblings('li').children('ul:visible').slideUp('fast');
so find the parent of the clicked "a" which is a "li". Then look for
it's siblings (other "li"s). Then look for all their children "ul"s that are visible and slide them up.
make sense?