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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Close DHTML Javascript Menu 1

Status
Not open for further replies.

yellowdawg2008

Programmer
Oct 30, 2008
2
CA
Hey there! We are using a script found on dhtmlgoodies.com. It is a expandable menu. We are using Demo2


What we are having a very hard time trying to figure out is how to make a category close. Currently a category will only close if you choose another category.

I would appreciate any help I can get with this as I have been pulling my hair out trying to figure it out.

Thanks so much in advance!
 
After viewing their source, I'd take a stab in the dark and say you could call the 'autoHideMenus()' function, judging by its name...

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
Excellent that does work. What I'm confused about is how to call that on a link that is calling it to open. Any ideas?

Thanks so much
 
You'd have to detect whether the menu was already open or not (probably by looking at the 'display' style of the first 'div' inside the 'li') and call either the open or close function accordingly.

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top