Home › Forums › JavaScript › Moving box auto scroll and loop › Re: Moving box auto scroll and loop
February 3, 2012 at 5:56 pm
#96131
Mottie
Member
Just add the following to the initialization code:
initialized: function(e, slider, tar){
$('button.slideshow').trigger('click');
},
and here is an updated demo.
And, if you want it to play forever, just remove this from the loop function:
// if wrap is true, check for last slide, then stop slideshow
if (mb.options.wrap !== true && mb.curPanel >= mb.totalPanels){
// click the button to pause
$('button.slideshow').trigger('click');
return;
}