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
If you can, you should really avoid trying to hit an exact number.
Using Stelok's function above, you can test like this:
if ($win.height() + $win.scrollTop() > (getDocumentHeight()-10)) {
It's a bit softer - the user may not have quite scrolled to the exact last pixel but thinks he/she is at the bottom.