qidian10

jqweui,0.8.2版本infinite存在bug,会存在下拉不触发的情况,解决办法:

源代码3730行附近

Infinite.prototype.scroll = function() {
      var container = this.container;
      var tagName = container[0].tagName.toUpperCase()
      var scrollTop
      if (tagName === \'BODY\' || tagName === \'HTML\') {
          scrollTop = container.scrollTop() || $(window).scrollTop()
      } else {
          scrollTop = container.scrollTop()
      }
      var offset = container.scrollHeight() - ($(window).height() + scrollTop);
    if(offset <= this.distance) {
      container.trigger("infinite");
    }
  }

压缩后js代码:https://files.cnblogs.com/files/qidian10/jquery-weui.min.js

注意:仅针对0.8.2版本,高级版本的官方已修复

分类:

技术点:

相关文章:

  • 2021-10-29
  • 2022-01-27
  • 2021-11-07
  • 2021-08-25
  • 2021-08-06
  • 2021-11-13
  • 2021-11-07
  • 2022-03-03
猜你喜欢
  • 2021-12-08
  • 2021-12-12
  • 2022-12-23
  • 2022-12-23
  • 2021-06-12
  • 2021-11-14
  • 2022-12-23
相关资源
相似解决方案