Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Moving box auto scroll and loop Re: Moving box auto scroll and loop

#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;
}