
pageTopScroller is a dead-simple JavaScript back to top plugin which displays a Back To Top button when you reach the bottom of the web page.
How to use it:
Include the stylesheet pageTopScroller.css and JavaScript pageTopScroller.js on the webpage.
<link rel="stylesheet" href="pageTopScroller.css"> <script src="pageTopScroller.js"></script>
That’s it. It also provides several options to customize the back to top button:
- IMG_SRC: the path to the Back To Top image
- ANIMATE_DURATION: the duration of the animation (in milliseconds)
- ANIMATE_INCREMENT: the increment of the scroll animation (in milliseconds)
options = {
'IMG_SRC': null,
'ANIMATE_DURATION': null,
'ANIMATE_INCREMENT': null,
}
const instance = new PageTopScroller(options);
instance.Main();






