Skip to content

Commit

Permalink
Merge pull request cubiq#103 from andrewdisley/master
Browse files Browse the repository at this point in the history
Added onScrollStart to scrollToPage event.
  • Loading branch information
Matteo Spinelli committed Aug 16, 2011
2 parents 57417af + 0a210a6 commit ed85125
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/iscroll.js
Original file line number Diff line number Diff line change
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 ed85125

Please sign in to comment.