JS implementation slides to automatically load more features at the bottom of the page

There are not many words, please see the code:

/ / scroll bar to the bottom of the page load more case $ (window). Scroll (Function () {var Scrolltop = $ (this). Scrolltop (); // Rolling bar Distance Top High Var scrollHeight = $ (Document) .Height (); // Current Height of the current page VAR ClientHeight = $ (this) .height (); // Currently visible page height // console.log (“Top:” + scrolltop + “, DOC:” + scrollheight + “, client:” + clientHeight); if (scrolltop + clientHeight> = scrollHeight) {// Distance top + Current height> = Document The total height is sliding to the bottom count ++; // Each slide COUNT plus 1 filterData (ServiceTypeID, IndustriD, cityID, count); // Call the filter method, count is the current paging number} else IF ScrollTop
 The above is the full content of this article, and it is desirable to bring certain help to everyone's learning or work, and also hope to support Tumi Cloud!  <=0){ 
 //滚动条距离顶部的高度小于等于0 TODO
 //alert("下拉刷新,要在这调用啥方法?");
 }
});                    
© Copyright Notice
THE END
Just support it if you like
like0
share
comment Grab the couch

Please log in to comment