滚动条到底部夹杂

  var scrollTop=  $(document).scrollTop();  //滚动条高度

            var contentHeight = $(document).height();//document的内容高度

            var viewH  =$(window).height();    //浏览器可见高度
            localStorage.scrollHeight=scrollTop;


            if(contentHeight - scrollTop -viewH <=10)
            {
                localStorage.page++;
                obj.append_content(localStorage.txt, localStorage.page);
            }

 

posted @ 2017-08-20 10:01  layfork  阅读(115)  评论(0编辑  收藏  举报