View Single Post
Unread 11-06-2008, 04:57 PM
colech colech is offline
Junior Member
Join Date: Nov 2008
Posts: 20

Wahoo... this page helped me figure out the first half of the problem. Now the items that have submenus are clickable. They don't stay expanded though, so I still need help on that but am looking for the answer now:

NOTE: I am using "udm-x-youarehere.js" instead of "udm-x-snapshot.js" because then if someone manually enters a url in the address bar, the menu will expand properly to right place instead of just saving the last click.

Here is what I gleaned from that and how I got it to work. Notice that I added the onclick to the <a> tag instead of the <li> tag. The reason for using "this.href" instead of "/about-us/index.html" was many people (like myself) have dynamically created menus. It's more difficult to write out the url both in href and onclick, so this way it just copies the value from the href tag to the onclick tag. Now my menu follows the link BUT does not expand for this page. At least we're one step closer.
<li class="onclick">
  <a href="/about-us/index.php" onclick="document.location.href=this.href; return false;">About Us</a>

Last edited by colech : 11-06-2008 at 05:53 PM.
Reply With Quote