Results 1 to 7 of 7

Thread: Accordion Menu script (v1.3)

  1. #1
    Join Date
    Jun 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Accordion Menu script (v1.3)

    1) Script Title: Accordion Menu script (v1.3)

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ordionmenu.htm

    3) Describe problem: I have everything up and running. What doesn't seem to be happening is when I click on one that has a submenu, I can't get that button to go to the correct website. It only drops down the list of the sub catagory. Now If I right click on the button with the drop down menu and have it open in a different page it will send me to the correct link. How do I get it to open the page when clicking on it the first time?

    Thank you very much.

    Nathan

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

    Default

    Hmm I'm not sure I understand. Do you have a link to the problem page?

  3. #3
    Join Date
    Jun 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    sure here it is.

    www.nationalcontainersales.com

    so click on containers and the submenu will show but it won't send you to the containers.html page. If you right click on the container menu and open in new window it will take you to the site.

    Nate

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

    Default

    Are you asking why clicking on the "Container" main header merely expands the sub menu, instead of also going to a URL? That's normal, since headers themselves aren't meant to act as URLs, but a way to expand/ hide sub menus. This is how all the demos on the DD script page behave as well.

    Not sure why you would want the headers hyperlinked, as this means as soon as the user clicks on one, before the sub menu even has a chance to expand, the user is whisked to another page. To enable it however, find the below lines in the .js file:

    Code:
    				else{
    					ddaccordion.collapseit($(this), $subcontent, config, true) //Last Boolean value sets 'isclicked' parameter
    				}
    				return false
    and remove the line in red.

  5. #5
    Join Date
    Jun 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks,

    That does the trick. Now there seems to be a problem with the menu. If you click the menu going down from containers to offices then to finance. Everything works like it should. Now if you work backwards bottom to top and click on those, it doesn't open up like it should. Is there a way to fix this?

    Thanks again for everything.

    Nate

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

    Default

    Hmm I believe I see the problem, as you're referring to the persistence feature no longer working as it should. When you enable a header to not only expand/collapse sub content, but navigate to a URL, the very likely scenario of the corresponding sub content not having fully expanded before the user is whisked away to the new page occurs. This means to the persistence feature, that sub content wasn't expanded the last chance it had a chance to look at it, resulting in that content not appearing expanded on the new page.

    The best solution I can think of is just to upgrade your script to v1.4, which supports expanding of sub contents onMouseover. That way, clicking on the headers now only does one thing- navigate to a URL, instead of also carrying the burden of expanding a sub content.

  7. #7
    Join Date
    Jun 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you very much!

    Nate

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
  •