I am implementing an infinite scroll pagination both up (if you are not on page 1) and down. To do this, I need to know when the user reaches the end of the div and when it