4dots Software
CODE HELP BLOG
To scroll to any element of the page with JQuery you have to use the animate function and set the scrollTop property to
the .offset().top of the element where you want to scroll to.
For example if you want to scroll to the div with id "scrolltarget", you would have to write the following code (500 is the animation speed) :
$('html, body').animate({ scrollTop: $('#scrolltarget').offset().top }, 500);