Skip to content

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

License

Notifications You must be signed in to change notification settings

emizzz/autoScrollPage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published