I am making a menu, and you can see what I have made so far in this fiddle
What I want to do is make it so that when I click the first <li> only the sub-menu for this <li> will show, and if I click another <li> I want this one the current one to close and show the new one. Atm clicking another wont close the previous.
Try defining a global variable which stores the active li? Then when one is clicked, check that the global variable has a value, if it does, then hide the li and set the global variable to the new li.
The value should be that of the li that is clicked. I hope this makes sense XP