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
12 changes: 9 additions & 3 deletions jquery.touchslider.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ http://touchslider.com
pagination: "." + namespace + "-nav-item",
currentClass: namespace + "-nav-item-current",
duration: 350,
mouseTouch: true
mouseTouch: true,
page: 0
// [container, scroller]
}, options);

var ret = {
current: 0,
step: step,
Expand Down Expand Up @@ -191,7 +192,7 @@ http://touchslider.com

// right calc, [3,4]
var leftInR = nodeLeft;

for (i = indexInViewport + 1; i < l; i++) {
leftInR += slides.eq(inViewport[i]).outerWidth() + options.margin;
endCoords[i] = leftInR;
Expand Down Expand Up @@ -631,6 +632,10 @@ http://touchslider.com
if (options.autoplay) {
start();
}

if(options.page){
step(options.page);
}

container.data(namespace, ret);
};
Expand All @@ -642,3 +647,4 @@ http://touchslider.com
return this;
};
}(jQuery));