当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - jQuery load more content when Scroll at bottom of the page

问题描述:

jQuery load more content when scroll to bottom of the page. My script is working well on Safari/iPad browser and android Mozilla browser. But not worked on Android default and Chrome browsers.

$("#div").scroll(function() {

if ($(this).scrollTop() >= ($(this)[0].scrollHeight - $(this).outerHeight())) {

// load more content function

}

});

网友答案:

Try this

$("#div").animate({scrollTop: $("#div")[0].scrollHeight}, 1000);
    $('#div').scroll(function() {
    //content goes here
     });
分享给朋友:
您可能感兴趣的文章:
随机阅读: