Spry

Sliding Panels widget options

You can set options for the Sliding Panels widget that let you better control the widget. You add the options to the constructor script. The following table provides a list of options.

Option

Description

Type

Default Value

defaultPanel

Determines the visible content panel when the page loads in the browser.

panel number or ID

first panel

duration

In milliseconds. Determines the length of time to get from one panel to another. The duration is always the same, regardless of the distance between panels. As a result, the speed of the animation is slower for closer panels and quicker for panels farther away from each other.

integer

500 milliseconds

enableKeyboardNavigation

A false value allows you to put the widget in focus, but disables the previous and next keys.

true or false

true

enableAnimation

A false value removes panel transitional animation.

true or false

true

transition

Determines the type of transition.

 

Spry.sinusoidalTransition

fps

Frames per second. Use fps and duration to refine the smoothness of the transition. A higher fps is generally smoother. Setting the fps too high might affect performance.

integer

60

Example

var sp1 = new Spry.Widget.SlidingPanels("panels",{duration:1000, fps:80, defaultPanel:4, enableAnimation:false, enableKeyboardNavigation:false});