Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't stop the infinite loop #31

Open
kater89 opened this issue Jan 8, 2016 · 2 comments
Open

Can't stop the infinite loop #31

kater89 opened this issue Jan 8, 2016 · 2 comments

Comments

@kater89
Copy link

kater89 commented Jan 8, 2016

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!

@bartholomewbischoff
Copy link

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.

@BenJackGill
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants