While reading lengthy web pages, readers often look for a link thatâ€™ll take them back to the top of the page without having to scroll upwards. Hereâ€™s a nice jQuery plugin that'll add a dynamic Scroll To Top link to your web pages. It is dynamic in the sense that it wonâ€™t show up when user is at the top of the page and will slowly fade in when page is scrolled down.
Now add a link to your web page html somewhere near your page header that'll act as Scroll to Top button.
<a id=â€goToTopâ€ href=â€#â€ >Go To Top</a>
Now in your jQuery Ready function, add these lines to make Go To Top link dynamic.