emizzz / autoScrollPage

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

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

License:Apache License 2.0


Languages

Language:JavaScript 78.3%Language:HTML 21.1%Language:CSS 0.6%