Vertical Custom Scrollbar for All Browsers in Javascript – wScroll.js

Category: Layout | August 10, 2018
Custom scrollbar for all browsers in Javascript
Author: wallet616
Official Page: Go to Website
Last Update:March 28, 2019

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. 

Finally, add somewhere script that runs the library. Following arguments means in the order: ID_of_the_element.


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.



You May Also Like

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.