I made a smooth scroll on my page, but when scrolling to the last anchor on my page the scroll just bumps radically to the bottom, because the content of my last div is not enough to fill the whole page and so the nice easing at the end is gone.
The function tries to put the anchor to the top of the page, but the div is to short.
Is there some way that I can prevent this? Is there some way the tell the function not to bump to the bottom?
Many many thanks in advance!
$('.submenu a').bind('click',function(event){ var $anchor = $(this); $('html, body').stop().animate({ scrollTop: $($anchor.attr('href')).offset().top-1}, 1000,'easeInOutExpo'); event.preventDefault(); });