jQuery Custom Scrollbar Plugin mousescroll.js (Original)

Add-ons
2026-07-25 22:41 3 次浏览 • 0 次下载 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.

星河码客

发现和分享优质开源项目,传承互联网精神,为开发者服务。

关于本站

联系我们

微信/广告合作:ITcloub (备注星河码客)

免责声明:本站资源版权归原作者所有,仅供学习与交流。如有侵权,请通过「关于我们 - 侵权投诉」联系删除。

Powered by Nuxt · Deployed on Cloudflare