PDA

View Full Version : Accordion conflict between collapseprev and expandall



iecwebmast
05-07-2010, 08:19 AM
1) Script Title: Accordion Content script (v1.7.1)

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/ddaccordion.htm

3) Describe problem:

I would like to use this accordion script with:
collapseprev: true, //Collapse previous content (so only one open at any time). Each time a user clicks on a header the previous one closes so that only one is open at any time.

But I also need to provide links to "Expand All", "Collapse All".
<a href="#" onClick="ddaccordion.expandall('mypet'); return false">Expand All</a> | <a href="#" onClick="ddaccordion.collapseall('mypet'); return false">Collapse All</a>

There is a conflict between the expandall and the collapseprev. When it tries to expandall it cannot because it must close the previous.

Otherwise this script works great for me. I plan to use it for a section of FAQs. How can I circumvent this conflict?

Thank you in advance for your help!

iecwebmast

SciKadaei
12-20-2012, 01:08 AM
Did you ever find a solution to this problem? I'm looking to do the same thing right now.

vwphillips
12-20-2012, 10:26 AM
http://www.vicsjavascripts.org.uk/Demos/121220A.htm