jQuery - Smooth scrolling to top of page

jQuery - Smooth scrolling to top of page

jQuery - Smooth scrolling to top of page

Allow your visitors to smooth scroll to the top of the page simply by clicking a a link (with #top id) located at the bottom of your page.

$("a[href='#top']").click(function() {
    $("html, body").animate({ scrollTop: 0 }, "slow");
    return false;
});

Source: http://stackoverflow.com/questions/1144805/how-do-i-scroll…