Skip to content

Commit

Permalink
Added onScrollStart to scrollToPage event.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdisley committed Aug 15, 2011
1 parent 57417af commit 0a210a6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/iscroll.js
Expand Up @@ -967,7 +967,9 @@ iScroll.prototype = {

scrollToPage: function (pageX, pageY, time) {
var that = this, x, y;


if (that.options.onScrollStart) that.options.onScrollStart.call(that);

if (that.options.snap) {
pageX = pageX == 'next' ? that.currPageX+1 : pageX == 'prev' ? that.currPageX-1 : pageX;
pageY = pageY == 'next' ? that.currPageY+1 : pageY == 'prev' ? that.currPageY-1 : pageY;
Expand Down

0 comments on commit 0a210a6

Please sign in to comment.