We normally do smooth scroll to an anchor on the same page.  But I found most the developers are looking for a solutions to perform smooth scroll to an anchor  from different page or loading new page.

Below script will help to perform smooth scroll on the same page:

Below piece of code will help to perform a smooth scroll from different pages.
Putting all together will perform smooth scroll on same and from different page with offset of 200px.

Leave a Reply

Your email address will not be published. Required fields are marked *