javascript - iscroll scrollEnd event does not fire, but scroll event and scrollStart event fire normally
天蓬老师
天蓬老师 2017-05-19 10:31:22
0
1
802

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

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(1)
黄舟

I solved it by writing it again, I don’t know why =-=

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!