A JS mini-library that allows to scroll the pages automatically by clicking the buttons.
Tested:
- with React
- with mobile devices
- Import css:
<link rel="stylesheet" href="./lib/AutoScrollPage.css">
- Import the AutoPageScroll class:
<script src="./lib/AutoScrollPage.bundle.js"></script>
- Create an instance of the class with the parameter "speed" (in the gif example this param is 3)
var autoPageScroll = new AutoPageScroll(3);
- 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();