View Full Version : Creating button at bottom of collaspible panel

09-11-2010, 08:16 AM
Hi all

I am wondering if its possible to create something so after people have opened and read my collaspiable panel (and they are at the bottom) they click a link which says CLOSE and it shuts the panel down so they can then easily open/read the next one.

Andy :grin:

09-11-2010, 08:40 AM
Hi Andy and welcome to the forum. Do you mean it working like an accordian widget? http://labs.adobe.com/technologies/spry/articles/accordion_overview/

09-11-2010, 09:11 AM
Thanks for the welcome:grin: Wish i had discovered the site earlier, found useful info already!

in reply to your post........sort of.....although with the accordian you always have a section open, and i would like all closed on default.

Here is an example of what i have done http://www.mrkarting.co.uk/New_10/grandprixevents.htm (http://www.mrkarting.co.uk/New_10/grandprixevents.htm#)

as you can see when it loads all are closed and someone said it would be good if you had the close option at the bottom of the content in each panel


09-11-2010, 09:25 AM
Must admit I haven't ever used Spry. I tend to go with JQuery for stuff like that. There's a member here called DWCourse and he may have a better idea than me.

09-11-2010, 09:42 AM
I believe it's possible with spry collapsible panels if you just figure out what the onclick event is to close a panel, so that you can add this onclick event to your self-made closing anchor tag too.

09-11-2010, 09:44 PM
believe this might work

<a href="#" onclick="CollapsiblePanel1.close();">Close Panel</a>

replace the number 1 at the end with the number of the panel (I think they start at 0)