Spry

Sliding Panels widget behaviors

The Sliding Panels widget includes built-in behaviors that let you easily navigate between panels.

Behavior

Description

Example

showPanel

Advances the content to display the specified panel. The value of the behavior is the number of the panel (using a zero-based counting system, which follows the order of the panel code), or the ID of the panel you want to show. Use the variable name from the widget’s constructor script tag to identify the widget in the behavior. The syntax is: variablename.showPanel(ID or panel#).

<a href="#" onClick="sp1.showPanel(4); return false;">Panel 4 </a>

showFirstPanel

Shows the first panel in the content panel group. Use the variable name from the widget’s constructor script tag to identify the widget in the behavior.

<a href="#" onclick="sp1.showFirstPanel(); return false;">First</a>

showPreviousPanel

Shows the panel previous to the panel currently in view.

<a href="#" onclick="sp1.showPreviousPanel(); return false;">Previous</a>

showNextPanel

Shows the panel that follows the panel currently in view.

<a href="#" onclick="sp1.showNextPanel(); return false;">Next</a>

showLastPanel

Shows the last panel in the content panel group.

<a href="#" onclick="sp1.showLastPanel(); return false;">Last</a>