Speed up mouse wheel in jScrollPane (jQuery)

梦想的初衷 提交于 2019-12-03 06:12:18

In the jquery.jscrollpane.js (or even .min.js file), find "mouseWheelSpeed" in the "defaults". This was 3 for me originally, I bumped it up to 30. Perhaps it is 3 or 30 pixles/click.

Edit

Sargin Sargin's answer is probably better for most cases. Given his solution, editing the plugin file would only make sense if you wanted to set a new default for reuse around a site. You'd also need to make note of changes made so that you don't lose your customisation when you update the file.

Abdullah SARGIN

You have to define the wheel speed when you initialize the plugin like this:

$('.scroll-pane').jScrollPane({
    mouseWheelSpeed: 50
});
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!