The same question is answered in jQUery but I\'m looking for solution without jQuery. How do you know the scroll bar has reached bottom of a page
I would like to kno
I just read through the jQuery source code, and it looks like you'll need the "pageYOffset". Then you can get the window height and document height.
Something like this:
var yLeftToGo = document.height - (window.pageYOffset + window.innerHeight);
If yLeftToGo is 0, then you're at the bottom. At least that's the general idea.