I just implement an infinite scroll without plugins in JavaScript with jQuery but it doesn't work on mobile browser. Works fine on computer browser..
$(window).scroll(function(event) {
if ($(window).scrollTop() + $(window).height() == $(document).height()) {
alert('bottom');
}
}
I just want to load content when the scroll reaches the bottom. It doesn't work on iPhone, iPad and Nexus 5 browser. What can be the problem?