I wish to achieve content load when the user scrolls to the bottom of the page.
I am having a problem. It works fine on desktop browsers but not on mobile. I have imple
Using jquery and Strelok's getDocumentHeight()
below (cheers!) I found the following worked pretty well. Testing for equality didn't work for me as the iPhone only registered a scroll value at the end of the slide which was actually greater than the document height:
$(window).scroll(function () {
var docHeight = getDocumentHeight();
if ($(window).scrollTop() + $(window).height() >= docHeight) {
// Do stuff
}
});