Results 1 to 4 of 4

Thread: Glossy accordian submenus open haphazardly

  1. #1
    Join Date
    Mar 2007
    Posts
    28
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default Glossy accordian submenus open haphazardly

    1) Script Title: Glossy accordion menu

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

    3) Describe problem:
    When I click from the home page to a secondary page, I would like to see the menu/submenu for the secondary page open - and only that menu/submenu. For example, when I click from home to collections, the collections page would appear with only the collections page menu/submenu open. http://www.tmatelson.com/Bettison/index.html

    Now, it defaults to whichever menu was open before, which is confusing. Or No menu/submenu is open and then folks don't know to click to see submenu options. So, when i click from the home page to the collections page, I would like for only the collections menu/submenu to be open.

    I tried using the defaultexpanded: [] but that makes all the submenus open.
    Mouseover features doesn't help the problem.
    Last edited by tmate; 02-13-2012 at 12:17 AM. Reason: adding url of the example

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

    Default

    On each of your pages containing the Accordion Menu, if you set the defaultexpanded[] option to just the page in question, disable persiststate and enable collapseprev, that should accomplish what you're looking to do. Now the issue with this approach is that you have to individually modify the defaultexpanded[] on each of your pages containing the menu to point to that page, which on large sites may not be feasible.

    Another approach is to explicitly expand a header on the target page by modifying the URL that points to it on the previous page with a query string in the form of "?headerclass=index_of_header_to_expand". See "Remote links that expand select headers on the target page" in the docs for more info.
    DD Admin

  3. #3
    Join Date
    Mar 2007
    Posts
    28
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    Hi
    the first solution is what I tried previously and it results in ALL the menus being open, not just the specific one desired.

    the second solution is unclear for the code I'm using... I tried replacing the
    <a class="menuitem submenuheader" href="C_collections.html"></a> with collections in place of submenuheader, and
    <a href="C_collections.html?headerclass=collections">

    just didn't work. The examples in the link you sent are mostly for opening a link on the same page....

    What am I doing wrong?
    thanks!
    Teri

  4. #4
    Join Date
    Mar 2007
    Posts
    28
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    With further trial and error, I believe I get it and it is working. I did have another problem with the disable persiststate when i needed to keep a section open while using the subsections - improved performance with some weaknesses! Using this:

    <li><a href="C_collections.html?submenuheader=1">Collections &amp; Research</a></li>

    http://www.tmatelson.com/Bettison/index.html

    thank you!
    Teri

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
  •