0

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

1 Answers1

0

Try this

$("#div").animate({scrollTop: $("#div")[0].scrollHeight}, 1000);
    $('#div').scroll(function() {
    //content goes here
     });
Imtiaz Pabel
  • 5,307
  • 1
  • 19
  • 24