PDA

View Full Version : All Levels Menu- top headers - OnClick



ryanjohnson00
01-28-2012, 06:41 AM
1) Script Title: All Levels Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddlevelsmenu/index.htm

3) Describe problem:
There has been some recent enhancements on the ddlevelsmenu.js file, up to version 3.01. I see when I use version 2.2 it changes the top menu to a click and that is what I want. Is there a way to do this on the newest version (3.01) so I have all those good updates as well? :)

Thank you!

Ryan Johnson

ddadmin
01-28-2012, 08:39 PM
Reuploaded .js file

Sure, try the below modified .js file, which should do the trick.

ryanjohnson00
01-28-2012, 09:23 PM
Wow, quick turnaround! :)

So this 3.0 version does not show my drop down menu. It drops down but the text for the links are missing. It does work for the original 3.01 version, which is the mouseover version. Is there something I can do to get the texts in the drop down menu to appear in this 3.0 version?

The reason I need the click version is because I do not actually have a link to redirect people on the top menu. People have been in the habit of clicking it which makes that first menu selection disappear. The click version seems to solve this.

In the example below the "Link 1" would not show up but everything below that would.

<li><a href="#" rel="submenu1">Request Forms</a>
<ul id="submenu1" class="ddsubmenustyle">
<li><a href="http://website/link1.htm" target="_new">Link 1</a></li>
<li><a href="http://website/link2.htm" target="_new">Link 2</a></li>
</ul>
</li>

ryanjohnson00
01-29-2012, 09:37 PM
Something to note on the 3.01 version. If I had this code for my menu:

<li><a href="#" rel="submenu1">Request Forms</a>
<ul id="submenu1" class="ddsubmenustyle">
<li><a href="http://website/link1.htm" target="_new">Link 1</a></li>
<li><a href="http://website/link2.htm" target="_new">Link 2</a></li>
</ul>
</li>

Then a user clicked on the header menu, all the of the child menu's would disappear. If the user went to a different menu and then back, all the child menu's would come back except for the first child.

If I comment out this code:
submenu.firstChild.style.visibility="hidden"

The menu would react the same way except that first child would hot be hidden.

There must be a different reason to hide that first child.

ddadmin
01-30-2012, 08:06 PM
Just to clarify, are you saying the modified .js file doesn't work for you? All it does is change the menu reveal action from mouseover to click for the top level headers, leaving everything else the same. If the original v3.01 .js file works, then this modified version should as well.

ryanjohnson00
01-31-2012, 04:00 AM
The .js file that is uploaded above is version 3.0 and I see a few things different. That one does not have the "ismobile" code in there where the 3.01 one does. It looks like a few other things are different.

Would you mind taking a look again? :) I have tried to change the 3.01 to a click where I think it might need it but that did not work.

I appreciate your help.

Ryan

ddadmin
02-01-2012, 08:56 AM
Ah yes you're right, for some reason I was working with the v3.0 file, not v3.01. I've reuploaded the .js file to fix this above. Please try it.

ryanjohnson00
02-02-2012, 05:17 AM
That worked, thanks for your help!

One note, I did have to comment out a couple "hidden" commands to get the child menu's to show up. When I clicked on the parent menu the dropdown would be white, showing no text. Once I commented out the lines below this worked great.

//submenu.style.visibility="hidden"
//submenu.firstChild.style.visibility="hidden"

Thanks again!

Ryan