Sign inSign up

jQuery Custom Scrollbar Plugin mousescroll.js (Original)

Add-ons
2026-07-25 22:41 3 views • 0 downloads 3.0KB
jQuery Custom Scrollbar Plugin mousescroll.js (Original)

Release Date: 2018-6-13 0:32

Usage

1
2
3
4
$(function(){
var api = new myApi();
api.mouseScroll.inte($('elem'),speen);
})

Copy /*Scrollbar Styles*/ into your CSS stylesheet (you can customize it according to your needs);

First, import the jQuery library, then import the plugin file. Open the plugin and find the code above to modify the ID and speed (elem is the ID of the scrolling content's lower-level element, and speen is the scrolling speed).

To call it multiple times, simply copy the following code multiple times:

1
2
var api = new myApi();
api.mouseScroll.inte($('elem'),speen);

As follows:

1
2
3
4
5
6
7
8
9
10
11
$(function(){
// Call once
var api_0 = new myApi();
api_0.mouseScroll.inte($('elem'),speen);
// Call twice
var api_1 = new myApi();
api_1.mouseScroll.inte($('elem'),speen);
// Call three times
var api_2 = new myApi();
api_2.mouseScroll.inte($('elem'),speen);
})

Note: When calling it multiple times, make sure the variable api has a different name for each instance.