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

#123467
Mottie
Member

@nori2tae In order to loop the slides in MovingBoxes, it clones the first and last slides. These clone slides are added to the end and beginning, respectively. So when you reach the last slide, you see the first cloned slide to the right. And when you see the first slide, the slide to the left of it is a clone of the last slide. When wrapping from the last to first slide, the script automatically jumps to the last cloned slide (left of the first slide) after you click the next arrow, this is why the slide to the left disappears. Also, if you are viewing the first slide and press the left arrow, the plugin repositions the slides so that the last slide (clone of the first slide) is centered, making the slide on the left disappear.

The only way to fix this would be to clone the first two slides, and the last two slides. Then things get really messy because the actual first slide is really the third slide.

I hope this all makes sense. Adding more code to cloning more slides just to prevent a brief flash of a slide disappearing while animating doesn’t seem worth the effort to me. If it gets too annoying, just set the width of the slider and the width of the panels inside to be almost the same, so only one panel is visible at a time.