Hi, There.
I hope somebody can help me with this. I have read posts, tried few different things but can't really get this right.
I have a j-query menu on my website. It has 4 categories and on click each one of them slides a list of submenus/links.
cargocollective.com/kryzstov2/
Originally, It worked smoothly but It abled me to open MORE THAN ONE category/menu at a time.
I then made some changes. I made to to close/ HIDE the submenus before opening a new one, but I assume I haven't done it properly as it looks cranky.
I m trying to:
1) Smoothly SLIDE BACK the submenus – instead of hiding them – before sliding the next submenus.
2) Create a conditional to CLOSE the menu/category being clicked IF it is already open.
I would appreciate if somebody could help me on this.
This is my current code:
<script text="javascript">
$(document).ready(function() {initMenu();});
function initMenu() {
$('#menu ul').hide();};
$('#menu li a').click (
function() {
$('#menu ul').hide();
$(this).next().slideToggle('normal');
}) </script>
Thanks a lot.
Esteneslau