My test code:
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)
It is found that the printed result every time when scrolling is:
Specific rendering content:
The internal li is added asynchronously later
I solved it by writing it again, I don’t know why =-=