Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions jquery.touchslider.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ http://touchslider.com
pagination: "." + namespace + "-nav-item",
currentClass: namespace + "-nav-item-current",
duration: 350,
mouseTouch: true
mouseTouch: true,
continuous: true
// [container, scroller]
}, options);

Expand Down Expand Up @@ -119,9 +120,17 @@ http://touchslider.com
to: function(toIndex, opt) {
opt = opt || {};
if (toIndex >= slides.length) {
toIndex = 0;
if(options.continuous){
toIndex = 0;
} else {
return false;
}
} else if (toIndex < 0){
toIndex = slides.length - 1;
if(options.continuous){
toIndex = slides.length - 1;
} else {
return false;
}
}
var duration = options.duration,
node = slides.eq(toIndex),
Expand Down