Results 1 to 8 of 8

Thread: All Levels Menu- top headers - OnClick

  1. #1
    Join Date
    Jan 2012
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default All Levels Menu- top headers - OnClick

    1) Script Title: All Levels Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...menu/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

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Edit: Reuploaded .js file


    Sure, try the below modified .js file, which should do the trick.
    Last edited by ddadmin; 02-01-2012 at 08:55 AM.
    DD Admin

  3. #3
    Join Date
    Jan 2012
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    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>
    Last edited by ryanjohnson00; 01-29-2012 at 09:38 PM.

  4. #4
    Join Date
    Jan 2012
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    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.

  5. #5
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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.
    DD Admin

  6. #6
    Join Date
    Jan 2012
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    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

  7. #7
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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.
    DD Admin

  8. The Following User Says Thank You to ddadmin For This Useful Post:

    ryanjohnson00 (02-02-2012)

  9. #8
    Join Date
    Jan 2012
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    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

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
  •