(function (jQuery) {
jQuery(window).on("load", function () {
jQuery("#inf-scroll-gallery").mCustomScrollbar({
axis: "x",
theme: "light-3",
advanced: {
autoExpandHorizontalScroll: true
}
});
});
})(jQuery);
我正在使用上面的自定义滚动条脚本。在这里,当我们滚动内容和拖动滚动条时,它可以完美地工作。但是我想要的是,我只需要在滚动条移动时才滚动内容。为了更清楚起见,我在这里分享了一些链接。
http://manos.malihu.gr/jquery-custom-content-scroller/
另请参阅水平滚动条。在这里,只有当我们拖动滚动条时,图像才会滚动。我们能做到吗?
http://manos.malihu.gr/repository/custom-scrollbar/demo/examples/complete_examples.html
发布于 2019-02-27 15:12:44
库支持这种问题,您可以将mouseWheel:{ enable: false }属性添加到脚本中
(function (jQuery) {
jQuery(window).on("load", function () {
jQuery("#inf-scroll-gallery").mCustomScrollbar({
axis: "x",
theme: "light-3",
mouseWheel:{ enable: false }
advanced: {
autoExpandHorizontalScroll: true
}
});
});
})(jQuery);
https://stackoverflow.com/questions/54899751
复制相似问题