Results 1 to 5 of 5

Thread: Accordion Menu: Can't go back to header page after expanding submenu

  1. #1
    Join Date
    Jul 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Accordion Menu: Can't go back to header page after expanding submenu

    1) Script Title: Glossy Accordion Menu

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

    3) Describe problem:

    I have the script implemented with my own CSS. It works great, except for one issue I can't seem to find a setting for:

    I have my headers set to "clickgo" since they are links. They expand as expected. Once expanded, if I go to a subitem, and while on the page for a subitem, I then click on the header, I am not returned to the header page. Instead, the header collapses, and then I have to click it again to go to the header page. Is this the expected behavior? Or is there a setting I can modify to do what I described?

    From a usability perspective, I'd expect to be able to go back to the main header section without having to first close the whole submenu and then click the header.

    Any help would be appreciated. This site is terrific and extremely helpful!

    -K

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

    Default

    This is by design actually. I assumed that the unitive thing to do is only to go to the URL when the user wants to see more, by expanding a sub menu. Collapsing usually means he wants to see less.

    In any event, to have the goto behavior present both when expanding and collapsing a sub menu, try the below modified .js file.
    DD Admin

  3. #3
    Join Date
    Jul 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by ddadmin View Post
    This is by design actually. I assumed that the unitive thing to do is only to go to the URL when the user wants to see more, by expanding a sub menu. Collapsing usually means he wants to see less.

    In any event, to have the goto behavior present both when expanding and collapsing a sub menu, try the below modified .js file.
    Thanks so much, I'll try this and report back.

    -Kevin

  4. #4
    Join Date
    Jul 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    This works great! Thank you.

    I'm trying to add some code to this application to highlight the current subitem. I have some js from another app that does highlight the subitems and am trying to marry the two. However, I am only semi-literate with js and am at a loss. Can anyone help?

    Thanks
    -Kevin

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

    Default

    It really depends on finding some way on your own of matching the current page with the sub menu that is supposed to be open, then either setting the "defaultexpanded" parameter of your menu, or calling one of the Accordion Menu expand/contract methods, to expand that sub menu. Typically this means you have some server side code that reliably determines as each page loads which sub menu within Accordion Menu should be open, then taking advantage of one of the two aforementioned methods of the script to actually realize it.
    DD Admin

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
  •