PDA

View Full Version : accordions and elements


Luke196
09-07-2008, 09:21 AM
I'm making an accordion panel with 2 elements in the constructor and can only get one to work. Followed adobe's instructions, no luck.

I am trying to start with all panels closed and without animation. Without animation works fine, starting with all panels closed, not so much:

var Accordion1 = new Spry.Widget.Accordion("Accordion1", { enableAnimation: false } , {usefixedpanelheights: false, defaultpanel: -1});

Is this the correct way to enter more than one element?

I always end up with the first panel open and the rest closed.

Luke196
09-08-2008, 10:49 AM
Nevermind, I figured it out.

Chapo
09-09-2008, 02:00 AM
Hey Luke196...once again

Well, maybe the most easiest way ot create that with an image will be with the behavior "show/hide elements (DIVS).

You click the image and that image will hide and the panels will show, click again and the panels will hide and the image will apear.

To do this you need to create DIV's, one for the image and the other for the panels, that way you could create the effect.