zoukankan      html  css  js  c++  java
  • 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 当前屏幕高度

      

  • 相关阅读:
    requirejs 第一个实例
    ionic + cordova 环境搭建
    免安装mysql配置
    ConcurrentHashMap
    volatile和synchronized
    zookeeper集群安装
    题目
    Nginx
    CountDownLatch
    自己总结
  • 原文地址:https://www.cnblogs.com/changlun/p/6993283.html
Copyright © 2011-2022 走看看