PDA

View Full Version : spry accordion: all content panels closed on page-load?


w1w
01-10-2011, 03:20 PM
Hi. I'm looking for a way to set up an accordion such that all the panels are closed (only the panel tabs visible) on page load, and then clicking any panel tab opens that tab's content panel to a specific height.

I see where I can set a value to have the first panel on any page be open to a specific height on page load, but would like to have them all closed up instead.

Any/all pointers appreciated.

Thanks.

w.

domedia
01-10-2011, 04:26 PM
I don't use the Spry Accordion myself, but I did a search on Google and this is what it gave me.

<script type="text/javascript">
var acc1 = new Spry.Widget.Accordion("Acc1", { useFixedPanelHeights: false, defaultPanel: -1 });
</script>

The link to the page:
http://labs.adobe.com/technologies/spry/samples/accordion/AccordionSample.html#AllPanelsClosed

.

w1w
01-10-2011, 05:16 PM
Thanks domedia. Apparently I need to brush up on my google skills as well.

w.

domedia
01-10-2011, 05:17 PM
Well sometimes it's not evident what you should search for, so don't be shy about asking here for help 8)

Thanks domedia. Apparently I need to brush up on my google skills as well.

w.

dickduran
02-09-2011, 09:00 PM
I am super new to using the spry accordion too. Where do I add that bit of code that you provided? The .js file? Before my div tags?

Super confused....

Thanks in advance

I don't use the Spry Accordion myself, but I did a search on Google and this is what it gave me.

<script type="text/javascript">
var acc1 = new Spry.Widget.Accordion("Acc1", { useFixedPanelHeights: false, defaultPanel: -1 });
</script>The link to the page:
http://labs.adobe.com/technologies/spry/samples/accordion/AccordionSample.html#AllPanelsClosed

.