Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Expanding Navigation Menus

Status
Not open for further replies.

Derwinator

Programmer
Aug 25, 2006
1
US
Hi all,

I'm a newbie to JavaScript and I've successfully implemented an expanding navigation menu into my web pages using the tutorial posted here:
Everything works great and I like that it remembers which menu is open between page loads. But I'd like to change the behavior so that clicking any menu heading expands it AND collapses the current expanded menu (menu toggling). As it is written all menus remain expanded until the user collapses them. With multiple menus things can get crowded very quickly.

I think a modification needs to occur to the toggle(obj) and newToggle(obj) functions but I am not sure how. I also assume that the cookie functions need to be changed to record the menu state change when it automatically collapses a menu.

Thanks a load for any help!!!

der
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top