I have a page in which I have a fixed positioned button, which when clicked should calculate the height of the viewport, and then scroll down the page by that height. ie. to the next viewport. When the user reaches the point when there is no more room to scroll I want to hide this button. Not sure how to do this, so far I have this:
$(document).on('click', '.next-viewport-down', function(event){
event.preventDefault();
var viewportHeight = $(window).height();
$('html, body').stop(true,true).animate({
.....
}, 2000);
});