/autoScrollPage

A JS mini-library that allows to scroll the pages automatically by clicking the buttons.

Primary LanguageJavaScriptApache License 2.0Apache-2.0

autoScrollPage

A JS mini-library that allows to scroll the pages automatically by clicking the buttons.

Tested:

  • with React
  • with mobile devices

Getting Started

  1. Import css:
<link rel="stylesheet" href="./lib/AutoScrollPage.css">
  1. Import the AutoPageScroll class:
<script src="./lib/AutoScrollPage.bundle.js"></script>
  1. Create an instance of the class with the parameter "speed" (in the gif example this param is 3)
var autoPageScroll = new AutoPageScroll(3);
  1. Call the method "addLockScroll()" if you want to use the scroll boundaries in the pages. You can remove it with the method "removelockScroll()".
autoPageScroll.addLockScroll(); 

//autoPageScroll.removelockScroll();