Saved from https://gist.github.com/lorddarq/3857347
//replace #fromA with your button/control and #toB with the target to which you wanna scroll to.
$("#fromA").click(function() {
$("html, body").animate({ scrollTop: $("#toB").offset().top }, 1500);
console.log('executed scrollToElement');
return true;
});