java script slowly scroll to the bottom of page code example
Example 1: js scroll to bottom
window.scrollTo(0,document.body.scrollHeight);
Example 2: javascript detect scroll to bottom of page
function scrolled(e) {
if (myDiv.offsetHeight + myDiv.scrollTop >= myDiv.scrollHeight) {
scrolledToBottom(e);
}
}