Infinite scrolling with ajax does not work with Chrome

Viewed 895

Okay, so after doing a lot of research on this very site, I have written the code to perform infinite scrolling.

JS:

$(window).scroll(function() {
    if ($(window).scrollTop() + $(window).height() == $(document).height()) {
        alert('This is Bottom!');
    }
});

Thing is, this works perfectly fine when run in Mozilla. But when I tried the same in Chrome or Opera, it didn't work.

Could you guys please help me out and tell me where the problem lies?

1 Answers
Related