Methods
Public Methods
These functions can be called after initialization to move to various panels. You can also bind your own pagination links; read the pagination section on the examples page for the syntax.
$('#slider').bbslider('next'); $('#slider').bbslider('prev'); $('#slider').bbslider('randomSlide'); $('#slider').bbslider('play'); $('#slider').bbslider('pause'); $('#slider').bbslider('destroy'); $('#slider').bbslider('update'); $('#slider').bbslider('travel',2); $('#clicker').bbslider('bindpager');
Getting data
Data is bound to the slider object and you can retrieve those values anytime.
Data variable
- pIndex
- cIndex
- pCount
- autoPlay
- settings
Settings variable
All options
autoPlay is whether or not the slider is playing. pIndex is the index for the current panel. cIndex is the index for the previous panel. pCount is for the total number of panels. Settings holds the options set at initialization.
var pIndex = $('#slider').data('pIndex'); var cIndex = $('#slider').data('cIndex'); var pCount = $('#slider').data('pCount'); var settings = $('#slider').data('settings'); var duration = settings.duration;
Setting data
You can set any of the above data at any time. Changing the duration, timer, loopTrans, loop, or easing should be safe, but the rest are important to the slider's initialization and should only be for advanced users. Setting the data manually could break the slider.
var settings = $('#slider').data('settings'); settings.duration = 5000; $('#slider').data('settings',settings);