Can't stop the infinite loop
Opened this issue · 2 comments
There is a good chance that I missed something but I am unable to get the infinite loop to stop. Here is my code:
$('#rollerSelector').scrollbox({
infiniteLoop: false,
linear: true,
delay: 0,
speed: 30,
autoPlay: false,
switchAmount: 1,
switchItems: 1,
onMouseOverPause: false,
distance: 36,
});
var myInterval = false;
$('#backwardBtn').mouseover(function(){
sliderClassTop();
sliderClassBottom();
$('#rollerSelector').trigger('backward');
myInterval = setInterval(function(){
sliderClassTop();
sliderClassBottom();
$('#rollerSelector').trigger('backward');
}, 1000);
}).mouseout(function() {
clearInterval(myInterval);
myInterval = false;
});
$('#forwardBtn').mouseover(function(){
sliderClassBottom2();
sliderClassTop2();
$('#rollerSelector').trigger('forward');
myInterval = setInterval(function(){
sliderClassBottom2();
sliderClassTop2();
$('#rollerSelector').trigger('forward');
}, 1000);
}).mouseout(function() {
clearInterval(myInterval);
myInterval = false;
});
< li >Option 1< /li >
< li >Option 2< /li >
< li >Option 3< /li >
< li >Option 4< /li >
< li >Option 5< /li >
< li >Option 6< /li >
< li >Option 7< /li >
< li >Option 8< /li >
< li >Option 9< /li >
Thanks!
Stopping the infinite loop feature is not working for me either and I have set the infiniteLoop option to false and defined the switchAmount option.
I'm not sure if this plugin is still maintained, but I'm also having the same problem.
Adding infiniteLoop: false,
does nothing.
See example jsFiddle here: http://jsfiddle.net/4vebnmx6/33/
Has anyone found a work around?
Perhaps another plugin library?