-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathslimscroll.jquery.txt
40 lines (35 loc) · 3.11 KB
/
slimscroll.jquery.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
┏━━━━━━━━━━━━━━━━┓
┃ SLIMSCROLL ┃
┗━━━━━━━━━━━━━━━━┛
ALTERNATIVES ==> #See nicescroll
VERSION ==> #1.3.1
JQ.slimscroll([OBJ]) #Gives overflow: auto to JQ, but makes the scrollbar thin and black.
#Options are OBJ, only at instantiation :
# - width|height STR : resize JQ(def: "auto" and "250px")
# - size STR : width of scrollbar (def: "7px")
# - position STR : "left" or "right" for the scrollbar (def: "right")
# - color STR : (def: "#000000#)
# - alwaysVisible BOOL (def: false)
# - disableFadeOut BOOL (def: false) : if true, scrollbar disappear
# immediately after mouseover
# - distance : from the edge (def: "1px")
# - start : "top", "bottom" or JQ2 (def: "top")
# - railVisible BOOL (def: false)
# - railColor STR (def: "#333333")
# - railOpacity DOUBLE (def: 0.2)
# - touchScrollStep NUM (def: 200) : touchscreen sensitivity
# - [railB|b]orderRadius NUL (def: "7px")
#This OBJ can be called after instantiation :
# - scrollTo|By STR (in px)
# - destroy VAL (any VAL)
#JQEVENT "slimscroll" is fired when reaching top|bottom, with event
#handler FUNC(JQEVENT, STR), where STR is "top|bottom"
#Actually:
# - wrap around a DIV with class "slimScrollDiv" and appends two
# siblings with class "slimScrollBar" and "slimScrollRail"
# - use inline styling, so need to use inline styling (such as
# JQ.css()) to override
#Doesn't resize with window resize. To fix this, do :
# WINDOW.addEventListener("resize", function(){
# JQ.slimscroll({ destroy: true }).slimscroll([OBJ])
# });