首页 > 其他 > 详细

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

时间:2017-06-12 16:01:54      阅读:310      评论:0      收藏:0      [点我收藏+]
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 当前屏幕高度

  

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

原文:http://www.cnblogs.com/changlun/p/6993283.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!