The wScroll.js is allowed to build a verticle custom scrollbar for all browsers without writing a lot of custom code. It is a Javascript library which allows you to add to objects scrollbar with modifiable appearance. This tool allows creating object like DIV’s with a scroller content area.
The custom scrollbar is very useful if you want to create a list of the element without using iframe code because of un-adjustable looks.
The plugin is pretty simple and easy to use but its work only at desktop devices. The plugin developer already working on to make it mobile friendly.
How to Use Vertical Scrollbar Plugin
First of all, you need to download the script and need to add the two important files to your webpage. You have to link library to the webpage by adding in head section patch to wScroll.css
and wScroll.js
.
<link rel="stylesheet" href="wScroll/wScroll.css"> <script src="wScroll/wScroll.js"></script>
Then create an object with specified id
.
<div id="test01"> <div id="myDiv"> My content. </div> </div>
Finally, add somewhere script that runs the library. Following arguments means in the order: ID_of_the_element
.
<script>wScroll("test01");</script>
Just to remember that, the height of the element DIV that you call the function on always matches the height of that element. It means if You set fixed size it will be that fixed size if you set a height to 100%
then it will match te height of the parent.