that.options里面添加事件名 (Line 139)
onScrollLimit: null
函数_move 结尾添加 (Line 490)
if (newY<that.maxScrollY) that.options.onScrollLimit.call(that, e);
函数 _startAni 结尾添加 (Line 768)
if (step.y<that.maxScrollY) that.options.onScrollLimit.call(that);
无论是滚动开始还是滚动结束,都会触发事件,而且是很多次。
下面是初始化例子。
myScroll = new iScroll('view', {onScrollLimit: function(){
console.log("I've past the end!");
}});

本文介绍如何在iScroll中添加滚动限制事件onScrollLimit,并在滚动达到边界时触发该事件。通过实例展示了如何使用此事件并输出日志。
264

被折叠的 条评论
为什么被折叠?



