Vanilla JavaScript Library For Custom Scrollbars – SimpleScrollbar

Category: Javascript | June 20, 2020
Author:buzinas
Views Total:8,989 views
Official Page:Go to website
Last Update:June 20, 2020
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.

<link rel="stylesheet" href="simple-scrollbar.css" />
<script src="simple-scrollbar.min.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();

Changelog:

06/20/2020

  • add unbinding capabilities

09/12/2019

  • Make scrollbar always visible

You Might Be Interested In:


Leave a Reply