Results 1 to 3 of 3

Thread: Menu doesn't always collapse

  1. #1
    Join Date
    Oct 2009
    Location
    La Selva Beach, CA
    Posts
    10
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Menu doesn't always collapse

    1) Script Title: Accordion Content script

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

    3) Describe problem:

    Sub Menus expand when the primary link for that section is clicked. They collapse when that primary link is clicked again or when another primary link with an expandable sub-section is clicked. My problem is, when clicking a primary link that doesn't expand (like Home page) the previous section doesn't collapse and that's confusing to a user who goes to Home page but sees the "Services" section expanded. Is there a way to get Services to collapse when Home is clicked?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    In your ddaccordion.init set:

    Code:
    	onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
    Code:
    	persiststate: false, //persist state of opened contents within browser session?
    If there is a particular header you need to be expanded on a particular page, set it with (also in your ddaccordion.init) its number (expandable headers are numbered 0 to whatever) here:

    Code:
    	defaultexpanded: [0], //index of content(s) open by default [index1, index2, etc]. [] denotes no content
    for that page. However, for the home page, where you say you want none expanded, use:

    Code:
    	defaultexpanded: [], //index of content(s) open by default [index1, index2, etc]. [] denotes no content
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Dec 2009
    Location
    Porto, Portugal
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have the exact same problem, but changing the ddaccordion.init set didn't solve my problem...

    I have 6 main menus and only 4 of them have sub-menus. Everything works fine, but when I click the menu without sub-menu the previous menu stays open. if I change the ddaccordion.init set (as indicated) all menus stay closed... What I want is that when I click on a head menu (with or without sub-menus) the previous menu to collapses. is this possible?

    here's my test site: http://citar.artes.ucp.pt/mtpnp/temp_teste/

    tks
    Last edited by muflyn; 01-28-2010 at 06:23 PM. Reason: alterations to the test web site

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
  •