SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast Ninth Dimension's Avatar
    Join Date
    Sep 2002
    Location
    London, England.
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Some help with a javascript menu

    Hi, I know almost nothing about JS, I know enough to get scripts from places like http://www.dynamicdrive.com/, and edit them to my needs, but that's about it.

    Earlier today I downladed the Switch Menu script from DD, and have edited it to my needs (basicly all I've done was change a few of the css properties, etc.. I didn't touch the code) and it's working great, but I want a tiny bit more..

    If you take a look at the switch menu, you'll see that by default each of the submenus starts in a closed state, and won't open until you click on one of the headers... what I'm looking for is the ability to have the top menu open automaticly when someone enters the site.

    I should not imagine it would be too hard to do, I just don't know how. If anyone would be able to tell me what needs to be changed to make this so, i'd apprechate it...

    Thank you

  2. #2
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Assuming the same names as in the demo...
    Code:
    <script type="text/javascript">
    
    onload = function()
    {
         SwitchMenu('sub1');
    }
    
    </script>
    ::: certified wild guess :::

  3. #3
    SitePoint Enthusiast Ninth Dimension's Avatar
    Join Date
    Sep 2002
    Location
    London, England.
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You star... that works perfectly, thank you!!!


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
  •