Single Header open only in Tiny Accordion

Hi,

I'm pretty sure my question is slightly different to those that have been asked previously along the same lines.

I am using the Accordion with a single nested sublevel. I have noticed that if I click any of the sublevel headings, the heading that is already open closes. But this does not seem to happen on the Top Level of headings. Here, I can click each to open, but on each click the previous heading does not close.

Hope that makes sense. Basically I want to apply the same functionality that drives the nested sublevels to the main (or top) accordion level.

Any help would be gratefully appreciated.

Truly excellent piece of scripting by the way.

Derrick
asked Jul 5, 2011 by derrickherbert (120 points)

2 Answers

0 votes
I too would like an answer to this if possible, my coding skills are not up to solving it!

Cheers,

Dave
answered Jul 25, 2011 by daveholden (140 points)
Yes me too please. I really need to make this so that one header closes when another one is clicked. Pleeeeease!

Kim
0 votes
I'm a bit late, but for those searching, this might help.

I solved this by changing the initiation command :

<script type="text/javascript">
    var parentAccordion=new TINY.accordion.slider("parentAccordion");
    parentAccordion.init("acc","h2",0,0);
</script>

to

<script type="text/javascript">
    var parentAccordion=new TINY.accordion.slider("parentAccordion");
    parentAccordion.init("acc","h2",1,0);
</script>

Also, if you change the second 0, it tells which menu section to open at the start.
answered Dec 9, 2011 by anonymous