SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2005
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    div show hide menu using javasript

    My menus are...

    main menu 1
    -->sub menu 11
    -->sub menu 12
    -->sub menu 13
    -->sub menu 14
    main menu 2
    -->sub menu 21
    -->sub menu 22
    -->sub menu 23
    -->sub menu 24
    -->sub menu 25
    -->sub menu 26
    main menu 3
    -->sub menu 31
    -->sub menu 32
    -->sub menu 33
    -->sub menu 34

    I want a code to display main menu 1, main menu 2 and main menu 3 initially. When anyone clicks on main menu 1 it should display the sub menus of main menu 1. When anyone clicks on main menu 2, main menu 2 should expand and main menu 1 should be hidden automatically.

    I also want to expand the main menu 1 automatically if one of the sub menus of main menu 1 is active.

    Can anyone guide me in the right direction?

    Any help is greatly appreciated. Thanks.

  2. #2
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Have a look on google for "javascript expanding collapsing menus", there are lots of these scripts around.

  3. #3
    doRighteousDeeds++
    Join Date
    Aug 2006
    Location
    تركيا Turkey Türkiye
    Posts
    266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  4. #4
    SitePoint Enthusiast
    Join Date
    May 2005
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys. I just found this article http://www.howtocreate.co.uk/tutoria...seExample.html and found the solution. It works like a charm.


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
  •