H5不能少的功能-滑动分页

$(window).scroll(function() {
                  var mayLoadContent = $(window).scrollTop() >= $(document).height() - $(window).height();
                  var docHeight = $(document).height();
                  if (mayLoadContent) {
                      if (!Nodes[N_wrap].hasClass(CLs_isLoading)) {
                          Nodes[N_wrap].addClass(CLs_isLoading);
                      }
                      self.goToNextPage(); //跳转到下一页的方法
                  }
});

posted on 2016-04-09 13:48  以勤补拙  阅读(4211)  评论(0编辑  收藏  举报