I have set up a jsfiddle that explains itself quite well: http://jsfiddle.net/nt7xzxur/ with the following smooth scrolling code:
function smoothScroll(hash) {
$('html, body').animate({
scrollTop: $(hash).offset().top
}, 750);
By clicking on any of the links provided, the browser window smoothly scrolls to the position where the corresponding item on the right side is located. However, I am looking to achieve something specific:
Since there isn't enough content below the last two items, they do not scroll all the way to the top like the others. I want all items to be able to scroll to the very top, but I haven't figured out how to do it in an elegant manner yet. Adding empty lines at the end seems like a crude solution as it affects the length of the right scroll bar.
Is there another method using CSS, JS, or other means to accomplish this?