Results 1 to 4 of 4

Thread: Collapse Switch Menu II

  1. #1
    Join Date
    Oct 2009
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Collapse Switch Menu II

    1) Script Title: Switch Menu II

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...itchmenu2.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

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    You may want to try the accordion menu: http://www.dynamicdrive.com/dynamici...ordionmenu.htm

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

    Good luck, Nile
    Jeremy | jfein.net

  3. #3
    Join Date
    Oct 2009
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the reply Nile,

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

    David

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Use this version of the script:

    Attachment 3096

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

    Code:
    <!-- *********************************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.
    Last edited by jscheuer1; 01-06-2010 at 05:16 PM. Reason: server went down
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. The Following User Says Thank You to jscheuer1 For This Useful Post:

    quadrant (01-07-2010)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •