Check if the document is scrolled near the bottom