$(document).ready(function (){ $("#scroll").click(function (){ $('html, body').animate({ scrollTop: $("#div").offset().top }, 500); }); });
Use scrollTop method, with a little delay animation (animate)
$(document).ready(function (){ $("#scroll").click(function (){ $('html, body').animate({ scrollTop: $("#div").offset().top }, 500); }); });
Use scrollTop method, with a little delay animation (animate)