0.0.1 • Published 5 years ago

drag-scroll.js v0.0.1

Weekly downloads
4
License
-
Repository
-
Last release
5 years ago

DragScroll.js

DragScroll.js is a small library for scrolling by dragging your mouse across the specified container.

Usage

import DragScroll from "dragscroll";

...

new DragScroll({
    el: this.element
});

Alternative method:

<script src="/dist/drag-scroll.js"></script>
<script>
    const scrollableElement = document.querySelector('.drag-scroll');
    new DragScroll({
        el: scrollableElement
    });
</script>

Demo

TODO