1. 程式人生 > >滾動條到底部夾雜

滾動條到底部夾雜

style () obj pre eight local nth app content

  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); }

滾動條到底部夾雜