You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've just implemented your jQuery slider, nice work.
One problem with the neverEnding setting. I've implemented a previous arrow and a next arrow and I have 3 slides. Every time you click the next arrow and wait till the sliding transition has ended before you click another time on the next arrow, it goes to the next slides perfectly and loops "never ending".
However, if you click the next arrow, and during the slide transition you click another time, then at the final slide the slides slide back (sliding left instead of right) to the first slide as if the neverEnding setting was set to false. It doesn't loop anymore.
My code:
$('#slider').simpleSlider({slides: '.slide',slideOnInterval: false,magneticSwipe: false,slideTracker: false,//neverEnding: false});slider=$('#slider').data("simpleslider");$('.control_next').click(function(){slider.nextSlide();// Go to the next slide});$('.control_prev').click(function(){slider.prevSlide();// Go to the previous slide});
The text was updated successfully, but these errors were encountered:
This indeed is a bug at the moment. The sliding mechanism clones the first and last slide and adds it to the end and beginning of the slide container. When you call the next slide it will go to all slides + 1 (which visualizes the first), but when you call the next slide again it will go to slide 2.
I will look into this as soon as possible, but at the moment the only workaround would be to prevent sliding when the slider is sliding.
In case of your implementation that would like something like this:
varsliding=false;$("#slider").on("beforeSliding",function(event){sliding=true;});$("#slider").on("afterSliding",function(event){sliding=false;});$('.control_prev').click(function(){if(!sliding){slider.prevSlide();// Go to the previous slide}});
Hi Dirk,
I've just implemented your jQuery slider, nice work.
One problem with the neverEnding setting. I've implemented a previous arrow and a next arrow and I have 3 slides. Every time you click the next arrow and wait till the sliding transition has ended before you click another time on the next arrow, it goes to the next slides perfectly and loops "never ending".
However, if you click the next arrow, and during the slide transition you click another time, then at the final slide the slides slide back (sliding left instead of right) to the first slide as if the neverEnding setting was set to false. It doesn't loop anymore.
My code:
The text was updated successfully, but these errors were encountered: