Cross Platform Custom Scrollbar JavaScript library – Scrolly.js

Category: Javascript | December 21, 2015
Author:annexare
Views Total:770 views
Official Page:Go to website
Last Update:December 21, 2015
License:MIT

Preview:

Cross Platform Custom Scrollbar JavaScript library – Scrolly.js

Description:

Scrolly.js is a vanilla JavaScript replacement for the native browser scrollbar. Cross browser and touch compatible. Also has the ability to add a custom scrollbar to any scrollable container. Also can be implemented as a jQuery plugin or a React component.

How to use it:

Add the scrolly.js JavaScript library to your webpages.

<script src="scrolly.js"></script>

Replace the default browser scrollbar.

scrolly.barNode(document.body, {
    // paramaters here
  }
});

Add a custom scrollbar to a specific element.

scrolly.bar('#container');

Methods.

// Update
scrolly.update(id);
// or update everything
scrolly.updateAll();
// Dispose
scrolly.dispose(id);
// or cleanup everything
scrolly.disposeAll();

Parameters.

axis: 'Y' // or x
onEdge: function(){}; // callback
thumbMinSize:24 // in pixel

 

You Might Be Interested In:


Leave a Reply