You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
unpack it and load the `dragscroll.js` or `dragscroll_micro.js`:
17
15
18
16
```html
19
17
<scriptsrc="dragscroll.js"></script>
@@ -34,6 +32,22 @@ Keep in mind that now it is not possible to select the content with
34
32
mouse, so apply the `cursor: default;` CSS style to prevent confusing
35
33
the users (or even `cursor: grab;` in case the content is not a text).
36
34
37
-
If you add (or remove) the `dragscroll` class after the page was
38
-
loaded, invoke `dragscroll.reset()` to update the listeners.
39
35
36
+
### Micro verison
37
+
38
+
Located in `dragscroll_micro.js`, its size is 425 bytes, and it just works.
39
+
40
+
41
+
### Full-featured verison
42
+
43
+
Located in `dragscroll.js`, has some additional features:
44
+
45
+
- that is an UMD module, so you can load it in a preferrable way;
46
+
47
+
- 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 `<head>`);
48
+
49
+
- add or remove the `dragscroll` class dynamically (if you do it,
50
+
invoke `dragscroll.reset()` to update the listeners).
0 commit comments