JQuery de rolagem infinita

$(window).scroll(function () {
    // End of the document reached?
    if ($(document).height() - $(this).height() == $(this).scrollTop()) {
        
      	alert('Scrolled to Bottom');
    }
}); 
syeddeveloper