Hi There!
I'm using the .toggle function for a menu I'm building for my site.
I'd like to be able to make it so that when each menu item is clicked, the currently open submenu closes and the new one opens (so having only 1 submenu set open at one time). Is there a way I can do this?
jQuery Code:
-
$(document).ready(function() {
-
$('#commentbox').hide();
-
$('a.comment').click(function() {
-
var id = $(this).attr('id');
-
$('#commentbox' + id).toggle(500);
-
// alert(id);
-
return false;
-
});
-
});
Thanks for your help! :)