slidng menus

slidng menus

heya wonder if anyone can help me with a problem,

i have a menu on my site which uses the following code:

   $("ul.mainmenu>li a").click(function(){
         var whatmenu = $(this).attr("id");
         var openmenu = "#" + whatmenu + "-menu";

                        return false;

and it works fine but i was wondering if there was a way for it to check to see if the menu is already open if so then close it, as it stands if u click on a menu which is open it will close it then open it again


    • Topic Participants

    • alan