Roller was designed to support both static and dynamic content within its panels. A wide range of features make it very customisable and flexible for a variety of uses, from a simple automated slideshow to an advanced interactive showcaser.
Roller was designed to support both static and dynamic content within its panels. A wide range of features make it very customisable and flexible for a variety of uses, from a simple automated slideshow to an advanced interactive showcaser.
width: 'auto',
height: 'auto',
autoRoll: 1,
autoRollLength: 5000,
autoRollPauseOnHover: 0,
animType: 'slide',
animLength: 1000,
animFlashColor: '#ffffff',
buildNav: [ 'prev', 'index', 'next' ],
startOnItemIndex: 0,
onrollend: function(){},
onautorollstart: function(){},
onautorollstop: function(){}
The width of the Roller area in pixels.
Default: auto
The height of the Roller area in pixels.
Default: auto
Enable/disable the auto roll feature.
Default: 1
Length of time (in milliseconds) until the auto roll moves to the next panel.
Default: 5000
Enable/disable the auto roll when the mouse enters the Roller.
Default: 0
The animation type for panel transitions.
Default: slide
Length of time (in milliseconds) for the panel transition animation.
Default: 1000
The color hex value for the animType:flash transition.
Default: #ffffff
An array containing any or none of the string values index, prev, next in the order you wish them to appear. If this is empty no navigation will be built or displayed.
Default: [ 'prev', 'index', 'next' ]
buildNav: [ 'index' ]
This example would only show a navigation list of the panels, e.g. 1 2 3 4 5
buildNav: [ 'prev', 'next' ]
This example would only show the previous and next buttons, e.g. « Previous Next »
The index of the panel to start the Roller on after initialisation. Index numbers start from 0, i.e. the first panel item will be 0.
Default: 0
Function to trigger when the panel transition animation finishes.
Default: function(){}
Function to trigger when the auto roll starts.
Default: function(){}
Function to trigger when the auto roll stops.
Default: function(){}
Show a specific panel.
$(rollerElem).trigger('roller_show', [ 1 ]);
Go to the next panel.
$(rollerElem).trigger('roller_next');
Go to the previous panel.
$(rollerElem).trigger('roller_next');
Start the autoroll timer.
$(rollerElem).trigger('roller_next');
Stop the autoroll timer.
$(rollerElem).trigger('roller_next');