Here is a rough model of what I mean: http://jsfiddle.net/dX2ux/1/
The internal CMS created by the client dynamically creates the menu using this HTML structure. It also comes with a jQuery script, which is shown in the sample.
I want to edit the script so that it closes it, opening the open menus, before it opens itself. The class showalso needs to be switched.
So far I have come up with the following: http://jsfiddle.net/dX2ux/2/
But if you play with it, it spins when you press one of the submenus.
Can someone shed some light on how I can achieve the kind of behavior I am striving for? Also, is this the best way to do this? Can I say this?
Any help is appreciated. Thank.
source
share