Vanilla JavaScript Library For Custom Scrollbars – SimpleScrollbar

Category: Javascript , Others | August 6, 2015
Author: buzinas
Views Total: 1,338
Official Page: Go to website
Last Update: August 6, 2015
License: MIT

Preview:

Vanilla JavaScript Library For Custom Scrollbars – SimpleScrollbar

Description:

A simple, lightweight, ES6 compatible vanilla JavaScript library to create a custom scrollbar on your scrollable content on mouse hover.

How to use it:

Download the SimpleScrollbar JS library, and include the simple-scrollbar.js at the bottom of the webpage.

<script src="simple-scrollbar.js"></script>

Initialize the SimpleScrollbar on a specific container.

<script>SimpleScrollbar.initEl(document.querySelector(".container"));</script>

Initialize the SimpleScrollbar on multiple containers.

<div id="container-a" data-ss-container></div>
<div id="container-b" data-ss-container></div>
<div id="container-c" data-ss-container></div>
...
SimpleScrollbar.initAll();