Spry

Open the panel programmatically

You can programmatically open and close the Collapsible Panel widget by using JavaScript functions. For example, you might have a button on your page, that opens the collapsible panel when the user clicks the button.

 Use the following functions to open or close a collapsible panel:
<input type="button" onclick="CollapsiblePanel1.open();" >open panel</input>
<input type="button" onclick="CollapsiblePanel1.close();">close panel</input>
<script type="text/javascript">
	var cp1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1");
</script>