我的测试代码:
var myScroll = new IScroll("#wrapper", {
probeType: 2,
preventDefault: false,
interactiveScrollbars: true,
useTransform: true
});
var scrollF = function() {
console.log(this.y, this.maxScrollY, "scroll");
}
var scrollEndF = function() {
console.log(this.y, this.maxScrollY, "scrollEnd");
}
myScroll.on('scroll', scrollF);
myScroll.on('scrollEnd', scrollEndF)
发现每次滚动的时候打印结果为:
具体渲染内容:
内部的li是后面异步加上去的
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…