PDA

View Full Version : Need some quick javascript help...




JustGretchen
Feb 9, 2009, 08:30 PM
http://javascript.internet.com/navig...ding-menu.html

I am trying to implement that on a page that I have. I found the solution to the first problem I was having by searching the forum here http://www.webdeveloper.com/forum/sh...expanding+menu

which was to keep the menu expanded as I click on the different main and sub parts of the menu and not have it collapse each time I go to a different page while using the nav.

So I implemented/swapped that Javascript into the code.

But my problem now is that i put links into the MAIN menu items so the code looks like this for the menu:
<ul id="menu">
<li><a href="landsite.html">Land Development & Site Design</a>
<ol>
<li><a href="Landsite1.html">Tom Brown Auto Body</a></li>
<li><a href="Landsite2.html">St. Nicholas</a></li>
<li><a href="Landsite3.html">York Springs UNited Methodist</a></li>
</ol>
</li>
<li><a href="municipal.html">Municipal Engineering</a>
<ol>
<li><a href="#">Sub Item 2.1</a></li>
<li><a href="#">Sub Item 2.2</a></li>
<li><a href="#">Sub Item 2.3</a></li>
</ol>
</li>

But now nothing expands at all. Any help or ideas?

Thanks!



angelwatt
Feb 9, 2009, 08:53 PM
The links you provided aren't working. The ... in them is what's wrong. Not sure how that happened.

JustGretchen
Feb 9, 2009, 09:32 PM
Link 1 http://javascript.internet.com/navigation/expanding-menu.html

Link 2 http://www.webdeveloper.com/forum/showthread.php?t=200742&highlight=expanding+menu

Jeez sorry. Dunno how that happened.
These stil have the ... but they do work.

angelwatt
Feb 9, 2009, 11:00 PM
It's possible you deleted a little too much or not enough when you modified the code. Can you post the current code you're using? I think I implemented something similar before, minus the remembering what was last selected.