PDA

View Full Version : Help with Accordion Menu script (v1.3)?



Ricendithas
05-31-2008, 03:49 AM
1) Script Title: Accordion Menu script (v1.3)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu.htm?expandable=0

3) Describe problem: Hello there, I would like to ask if it is possible that there will be no collapsed header? I mean, it will only allow one header to be expanded at a time but will not allow all the headers to be collapsed that there will be one header that will remain expanded. I hope you understand me. Thanks.

:)

ddadmin
05-31-2008, 06:15 AM
Sure. Inside the .js file, try changing the line:


else{
ddaccordion.collapseit($(this), $subcontent, config, true) //Last Boolean value sets 'isclicked' parameter

to instead:


else if ($(this).get(0)!=lastexpanded.$header.get(0)){
ddaccordion.collapseit($(this), $subcontent, config, true) //Last Boolean value sets 'isclicked' parameter

Ricendithas
05-31-2008, 06:45 AM
Sure. Inside the .js file, try changing the line:


else{
ddaccordion.collapseit($(this), $subcontent, config, true) //Last Boolean value sets 'isclicked' parameter

to instead:


else if ($(this).get(0)!=lastexpanded.$header.get(0)){
ddaccordion.collapseit($(this), $subcontent, config, true) //Last Boolean value sets 'isclicked' parameter


Thank you very much, it already works.