htmlautoscroll

1.0.6 • Public • Published

htmlautoscroll

Automatically scroll top-to-bottom and bottom-to-top a webpage. DEMO

install

$ yarn add htmlautoscroll
# or
$ npm install --save htmlautoscroll

use

<script src="htmlautoscroll.js"></script>

<script type="text/javascript">
// start scrolling
htmlautoscrollStart(
  10, // scrolling speed in pixel per sec
  2000, // time to wait when an extremity is reached in milliseconds
  (bottom) => console.log('reached', bottom ? 'bottom' : 'top') // callback when an extremity is reached
);

// stop scrolling
htmlautoscrollStop();
</script>

license

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i htmlautoscroll

Weekly Downloads

1

Version

1.0.6

License

MIT

Unpacked Size

29 kB

Total Files

9

Last publish

Collaborators

  • bagage