1$(window).scroll(function() {
2 $('html, body').animate({
3 scrollTop: $("#myDiv").offset().top
4 }, 2000);
5});
1<html>
2 <a href="#down">Click Here to Smoothly Scroll Down</a>
3 <div id="down">
4 <h1>You are down!</h1>
5 </div>
6</html