PDA

View Full Version : Spry Accordion


BullDog
11-15-2011, 06:54 AM
is there a way to link to a specific tab on a spry accordion install? I am going to have one page with an accordion install. I would like to be able to be able to navigate to that page with a specific tab open if possible.

DWcourse
11-15-2011, 02:23 PM
From http://labs.adobe.com/technologies/spry/articles/accordion_overview/

Set the default open panel

You can set a certain panel to be open when the page containing the Accordion widgets loads in a browser.

Set the defaultPanel option in the constructor as follows:
<script type="text/javascript">
var acc8 = new Spry.Widget.Accordion("Accordion1", { defaultPanel: 2 });
</script>
Note: The accordion panels use a zero-based counting system, so setting the value to 2 opens the third panel.