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
Copy file name to clipboardExpand all lines: README.textile
+14-11Lines changed: 14 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -18,12 +18,11 @@ To use the plugin you obviously need jQuery (it should work in jQuery 1.4 and la
18
18
19
19
h2. Download
20
20
21
-
You can download the latest version "here":https://github.com/mzubala/jquery-custom-scrollbar/raw/master/build/jquery-custom-scrollbar-0.5.2.zip
21
+
You can download the latest version "here":https://github.com/mzubala/jquery-custom-scrollbar/raw/master/build/jquery-custom-scrollbar-0.5.3.zip
22
22
23
23
h2. Demos
24
24
25
-
In <code>demos</code> folder of this repo, there are some example usages of custom scrollbar and its api. The demos are also
26
-
available online "here":http://jquery-custom-scrollbar.rocketmind.pl/
25
+
In <code>demos</code> folder of this repo, there are some example usages of custom scrollbar and its api. The demos are also available online "here":http://jquery-custom-scrollbar.rocketmind.pl/
27
26
28
27
h2. Usage
29
28
@@ -54,8 +53,7 @@ Add a skin class to your container:
54
53
</div>
55
54
</pre></code>
56
55
57
-
In the example we use <code>default-skin</code>. Plugin comes with two other predefined skins: <code>gray-skin</code> and <code>modern-skin</code>.
58
-
You are not limited to that and you can style scrollbar your own way.
56
+
In the example we use <code>default-skin</code>. Plugin comes with two other predefined skins: <code>gray-skin</code> and <code>modern-skin</code>. You are not limited to that and you can style scrollbar your own way.
59
57
60
58
Finally call this js code:
61
59
@@ -82,15 +80,20 @@ h2. Options
82
80
There are some options you can pass when initializing scrollbar:
83
81
84
82
|_. Option |_. Type|_. Default value |_. Description |
85
-
| <code>skin</code>|<code>String</code>|<code>undefined</code>|A css skin class that will be added to the scrolled container. You can define it in html as well as here in options. Note that skin has to be defined in one of those ways.|
83
+
| <code>animationSpeed</code> | <code>Integer</code> | <code>300</code> | Speed of the animation of programatic scrolling.|
86
84
| <code>hScroll</code> | <code>Boolean</code> | <code>true</code> | Indicates whether or not, horizontal scrollbar should be shown when it's necessary. |
87
-
| <code>vScroll</code> | <code>Boolean</code> | <code>true</code> | Same as above but applies to vertical scrollbar. |
85
+
| <code>skin</code>|<code>String</code>|<code>undefined</code>|A css skin class that will be added to the scrolled container. You can define it in html as well as here in options. Note that skin has to be defined in one of those ways.|
88
86
| <code>updateOnWindowResize</code> | <code>Boolean</code> | <code>false</code> | Indicates whether scrollbar should recalculate thumb size when window is resized. See <code>demos/resize.html</code> for an example.|
87
+
| <code>vScroll</code> | <code>Boolean</code> | <code>true</code> | Same as above but applies to vertical scrollbar. |
@@ -99,23 +102,23 @@ There are some methods of the plugin you may want to call.
99
102
100
103
h3. scrollTo(element)
101
104
102
-
Scrolls viewport to a given element inside scrolled content. An element might be jQuery object or a selector string. Example usage:
105
+
Scrolls viewport to a given element inside scrolled content. An element might be jQuery object or a selector string. To controll animation speed use <code>animationSpeed</code> initialization option. Example usage:
Sets horizontal scrollbar position to <code>x</code> pixels. <code>x</code> should be in range from 0 to scrolled content width. If it's outside that range, content will be scrolled to the start or to the end.
113
+
Sets horizontal scrollbar position to <code>x</code> pixels. <code>x</code> should be in range from 0 to scrolled content width. If it's outside that range, content will be scrolled to the start or to the end. To controll animation speed use <code>animationSpeed</code> initialization option.
111
114
112
115
<pre><code>
113
116
$(".container").customScrollbar("scrollToX", 100)
114
117
</pre></code>
115
118
116
119
h3. scrollToY(y)
117
120
118
-
Sets vertical scrollbar position to <code>y</code> pixels. <code>x</code> should be in range from 0 to scrolled content height. If it's outside that range, content will be scrolled to the start or to the end.
121
+
Sets vertical scrollbar position to <code>y</code> pixels. <code>x</code> should be in range from 0 to scrolled content height. If it's outside that range, content will be scrolled to the start or to the end. To controll animation speed use <code>animationSpeed</code> initialization option.
0 commit comments