diff --git a/README.md b/README.md index cf3e7be..8e5f992 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ dragscroll ========== -Dragscroll is a tiny javascript library (978 bytes minified) which +Dragscroll is a tiny javascript library (425 bytes minified) which enables scrolling via holding the mouse button (drag-n-drop style, [online demo](http://asvd.github.io/dragscroll/)). @@ -10,10 +10,8 @@ enables scrolling via holding the mouse button (drag-n-drop style, Download the -[distribution](https://github.com/asvd/dragscroll/releases/download/v0.0.1/dragscroll-0.0.1.tar.gz), -unpack it and load the `dragscroll.js` in a preferrable way. That is -an UMD module, thus for instance it may simply be loaded as a plain -JavaScript file using the ` @@ -34,6 +32,22 @@ Keep in mind that now it is not possible to select the content with mouse, so apply the `cursor: default;` CSS style to prevent confusing the users (or even `cursor: grab;` in case the content is not a text). -If you add (or remove) the `dragscroll` class after the page was -loaded, invoke `dragscroll.reset()` to update the listeners. +### Micro verison + +Located in `dragscroll_micro.js`, its size is 425 bytes, and it just works. + + +### Full-featured verison + +Located in `dragscroll.js`, has some additional features: + +- that is an UMD module, so you can load it in a preferrable way; + +- it can be loaded after the page load, the library will find the elements with the `dragscroll` class and setup the events for them (micro version does this on page load and should be included in the ``); + +- add or remove the `dragscroll` class dynamically (if you do it, +invoke `dragscroll.reset()` to update the listeners). + + +Have fun!