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

Continuous not working with touch plugin #45

Open
Wlada opened this issue Oct 20, 2012 · 2 comments
Open

Continuous not working with touch plugin #45

Wlada opened this issue Oct 20, 2012 · 2 comments

Comments

@Wlada
Copy link

Wlada commented Oct 20, 2012

Continuous not working with the touch enable. It works like loop , not like continuous.

Any suggestions how to fix this?

@fdussert
Copy link

Hi,
I've fixed it by modifying the jquery.rs.carousel-touch.js
Line 254 you'll find

if ((this.index === this.getNoOfPages() - 1 && direction === 'next') || (this.index === 0 && direction === 'prev')) {
this.goToPage(this.index);
}
else {
thisdirection;
}

Just add a test for the continuous option like that

if(this.options.continuous){
thisdirection;
}else{
if ((this.index === this.getNoOfPages() - 1 && direction === 'next') || (this.index === 0 && direction === 'prev')) {
this.goToPage(this.index);
}
else {
thisdirection;
}
}

@fdussert
Copy link

I just made a PR #73

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

2 participants