我在这里遇到了一些麻烦。我正在使用这个JQuery自定义内容滚动插件(http://manos.malihu.gr/jquery-custom-content-scroller/) -它很棒,但我面临一个问题。我已经禁用了mouseWheel,给它一个'false‘mouseWheel:{scrollAmount:false}的滚动量。每当我向下/向上滚动页面时,它会阻止插件滚动,但当我向下/向上滚动网页时,每当光标悬停在插件上时,网页就会卡住。以下是我到目前为止拥有的JQuery代码,如下所示:
(function($){
$(window).load(function(){
/*
get snap amount programmatically or just set it directly (e.g. "273")
in this example, the snap amount is list item's (li) outer-width (width+margins)
*/
var amount=Math.max.apply(Math,$("#content-1 li").map(function(){return $(this).outerWidth(true);}).get());
$("#content-1").mCustomScrollbar({
axis:"x",
theme:"inset",
enable: true,
advanced:{
autoExpandHorizontalScroll:true
},
scrollButtons:{
enable:true,
scrollType:"stepped"
},
keyboard:{scrollType:"stepped"},
snapAmount:amount,
verticalScrolling: false,
horizontalScrolling: true,
mouseWheel:{scrollAmount:false}
});
});
})(jQuery);
为了说明这一点,我附带了一张图表:

如有任何帮助,我们将不胜感激-谢谢:)
发布于 2015-08-19 16:41:31
要禁用鼠标滚轮,请执行以下操作:mouseWheel:{ enable: false }
来自this post。我也有类似的问题,这个问题为我解决了。
https://stackoverflow.com/questions/31949196
复制相似问题