smooth scroll jquery onclick
snippet in javascript

smooth scroll jquery onclick

user7097

$("#button").click(function() {
    $('html, body').animate({
        scrollTop: $("#myDiv").offset().top
    }, 2000);
});