Skip to content

Commit b3341c8

Browse files
Aliaksei BykouskiAliaksei Bykouski
authored andcommitted
merge lusever#1 and lusever#8
2 parents 09d0603 + 0c78b0d commit b3341c8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

jquery.touchslider.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ http://touchslider.com
3030
currentClass: namespace + "-nav-item-current",
3131
duration: 350,
3232
mouseTouch: true,
33-
page: 0
33+
page: 0,
34+
callback: function() {}
3435
// [container, scroller]
3536
}, options);
3637

@@ -400,6 +401,7 @@ http://touchslider.com
400401
function changedView(index) {
401402
pagination.removeClass(options.currentClass)
402403
.eq(index).addClass(options.currentClass);
404+
options.callback.call(this, index);
403405
}
404406

405407
// set item or next
@@ -467,10 +469,12 @@ http://touchslider.com
467469
// left/right button
468470
$(options.prev, container).click(function() {
469471
prev();
472+
return false;
470473
});
471474

472475
$(options.next, container).click(function() {
473476
next();
477+
return false;
474478
});
475479

476480
function initTouch() {

0 commit comments

Comments
 (0)