html5-drag-to-scroll-pmb
v1.0.1
Published
Drag the content to scroll your `overflow`-ing HTML5 DOM element.
Readme
html5-drag-to-scroll-pmb
Drag the content to scroll your overflow-ing element.
API
This module exports one function:
dragToScroll(opt)
opt is an options object. Currently, the only supported key is:
elem: The HTML DOM element on which to install.When you pass a DOM element instead of
opt, it is used as theelemopt.
Side effects
- When the module is loaded and cannot find any module loading system,
it assumes you've run it inside a plain simple website (like the live demo).
In that case, it exposes itself on a window global named
dragToScrolland also installs itself onto all elements currently available that have the CSS classdrag-to-scroll.
Known issues
- Needs more/better tests and docs.
License
ISC
