[英]jQuery load more content when Scroll at bottom of the page
滾動到頁面底部時,jQuery將加載更多內容。 我的腳本在Safari / iPad瀏覽器和android Mozilla瀏覽器上運行良好。 但不適用於Android默認瀏覽器和Chrome瀏覽器。
$("#div").scroll(function() {
if ($(this).scrollTop() >= ($(this)[0].scrollHeight - $(this).outerHeight())) {
// load more content function
}
});
嘗試這個
$("#div").animate({scrollTop: $("#div")[0].scrollHeight}, 1000);
$('#div').scroll(function() {
//content goes here
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.