Display A Back To Top Button When Reaching The Bottom Of the Page – pageTopScroller

Category: Javascript | August 10, 2019
Author:noknow-hub
Views Total:468 views
Official Page:Go to website
Last Update:August 10, 2019
License:MIT

Preview:

Display A Back To Top Button When Reaching The Bottom Of the Page – pageTopScroller

Description:

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();

You Might Be Interested In:


Leave a Reply