scrollbars
v0.7.1
Published
Cross-browser minimalistic scrollbars.
Downloads
21
Readme
Scrollbars
This package adds cross-browser minimalistic scrollbars to DOM elements
using the class .scrollbars
. Very little configuration is needed to user
scrollbars in your project.
Installation
npm
npm install scrollbars --save
bower
coming soon...
Usage
Basic Usage
Add the class to the DOM element that you would like scrollbars on.
<div class="scrollbars">
...
</div>
Customization
Add the class no-rail
to hide the rail behind the scrollbar.
<div class="scrollbars no-rail">
...
</div>
API
First create a new instance of scrollbars.
var scrollbars = new Scrollbars;
Create a new scrollbars element.
scrollbars.create(document.querySelector('.selector'));
Destroy an instance of a scrollbars element.
scrollbars.destroy(document.querySelector('.selector'));