Results 1 to 3 of 3

Thread: DDACCORDION does not do what I want

  1. #1
    Join Date
    Jun 2011
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default DDACCORDION does not do what I want

    1) Script Title:
    DDACCORDION does not do what I want

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

    3) Describe problem:
    I have this code ddaccordion.init({headerclass:"mypets",contentclass:"thepet",revealtype:"mouseover",mouseoverdelay:500,collapseprev:true,defaultexpanded:[],onemustopen:false,animatedefault:false,persiststate:false,toggleclass:["","openpet"],togglehtml:["none","",""],animatespeed:"slow",oninit:function(expandedindices){},onopenclose:function(header,index,state,isuseractivated){}})</script>
    on my page http://ppbm6.com/Planning.html

    However switching from panel to panel does not reset to the default state.
    What I want is to have the panel switch to the default mode after switching panel, no open accordions anymore. Same as after reloading the page.

    See
    Last edited by Harm Millaard; 05-17-2012 at 03:25 PM.

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

    Default

    Looking at your page, the headers are currently set to expand/contract onmouseover, and the previous header (ie: "Filters") *does* contract when the current one is expanded (ie: "positive air pressure). As to your question of how to persist this state even when the page is reloaded, try setting the "persiststate" option inside the initialization code to true:

    Code:
    ddaccordion.init({headerclass:"mypets",contentclass:"thepet",revealtype:"mouseover",mouseoverdelay:500,collapseprev:true,defaultexpanded:[],onemustopen:false,animatedefault:false,persiststate:true,toggleclass:["","openpet"],togglehtml:["none","",""],animatespeed:"slow",oninit:function(expandedindices){},onopenclose:function(header,index,state,isuseractivated){}})
    DD Admin

  3. #3
    Join Date
    Jun 2011
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    To show you what I mean in saying weird behavior, do the following:

    Reload the page
    Open the Case panel
    Open the Cooling panel
    Everything is OK
    Open the Case panel and expand the Start header
    Open the Cooling panel and expand the Filters header
    Open the Case panel

    Now you see the problem: the Start header is no longer highlighted, but is still expanded and does not collapse when another header is selected.

    The persiststate option did not solve it for me.

    Thanks for your suggestion however.
    Last edited by Harm Millaard; 05-17-2012 at 09:24 PM.

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
  •