iscroll5上拉一定幅度加载计算留存

new IScroll('#' + parameter.id, {
    preventDefault: false,
    preventDefaultException: {tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT|H1|H2|DIV|A|IMG)$/},
    useTransition: true,
    vScrollbar: false,
    topOffset: 0,
    probeType: 2,
    deceleration: 0.006
});
" + parameter.id + ".on('scrollStart', function () {
    minY = this.y;
});
" + parameter.id + ".on('scroll', function () {
    minY = minY < this.y ? minY : this.y;
});
" + parameter.id + ".on('scrollEnd', function () {
    minY = minY < this.y ? minY : this.y;
    if (this.y - minY > 10 && (this.directionY === 1)) {
        refresher.onPulling(pullUpEl, parameter.pullUpAction);
    }
});

//this.scrollerHeight 页面内容整体高度
//this.y 页面已经滚动过去的距离
//this.wrapper.clientHeight 当前屏幕高度

  

原文地址:https://www.cnblogs.com/changlun/p/6993283.html