SyntaxFix
Write A Post
Hire A Developer
Questions
Simplest solution I have seen
var offset = $("#target-element").offset(); $('html, body').animate({ scrollTop: offset.top, scrollLeft: offset.left }, 1000);
Tutorial Here