@arted/scroll

Arted scroll

Usage no npm install needed!

<script type="module">
  import artedScroll from 'https://cdn.skypack.dev/@arted/scroll';
</script>

README

@arted/scroll

Arted scroll

Installation

npm

$ npm install @arted/scroll

or yarn

$ yarn add @arted/scroll

Usage

import Scroll from '@arted/scroll';

// 创建滚动
const scroll = new Scroll('#el');

// 添加滚动事件
scroll.on('scroll', e => {
    // do something;
});

// 销毁滚动
scroll.destroy();