Log in

View Full Version : Collapse Switch Menu II



quadrant
01-03-2010, 12:06 AM
1) Script Title: Switch Menu II

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/switchmenu2.htm#

3) Describe problem: Hi,

I have downloaded Switch Menu II and I am trying to get only one submenu showing at a time. When you click a new heading it expands but I would like the previous one to collapse. I have found some posts regarding this from a few years ago but they relate to menu.js and the current version is xpmenuv21.js and the code around the recommended changes is completely different.

Any solutions would be appreciated.

David

Nile
01-03-2010, 11:40 PM
You may want to try the accordion menu: http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu.htm

If it doesn't satisfy you, mind linking me to the page where it said to modify menu.js?

Good luck, Nile

quadrant
01-06-2010, 02:24 PM
Thanks for the reply Nile,

Here is the post: http://www.dynamicdrive.com/forums/showthread.php?t=6313

David

jscheuer1
01-06-2010, 05:09 PM
Use this version of the script:

3096

Just make sure that if you have one open by default, it has its display set as inline, exactly as shown (highlighted) below:


<!-- *********************************Start Menu****************************** -->
<div class="mainDiv" >
<div class="topItem" >Demo Menu 1</div>
<div class="dropMenu" ><!-- -->
<div class="subMenu" style="display:inline;">
<div class="subItem"><a href="#">Configuration</a></div>
<div class="subItem"><a href="#">Tool Box</a></div>
<div class="subItem"><a href="#">Contact Us</a></div>
<div class="subItem"><a href="#">Sub Menu 4</a></div>
<div class="subItem"><a href="#">Sub Menu 5</a></div>
</div>
</div>
</div>

<!-- *********************************End Menu****************************** -->

Note: This will only work out well if you have 0 or 1 menus open by default.