[英]Mousewheel doesn't working (mCustomScrollbar jQuery plugin)
我正在寻找我的问题的解决方案,但我找不到它。 所以我下载了jQuery插件(mCustomScrollbar),一切都很好没有一件事 - 我无法在我的测试页面中通过鼠标滚动滚动。 控制台很清楚,作者的例子很有用。 我尝试在最新的Firefox和Chrome中运行我的代码,但代码无效。
我的代码:
HTML:
<div id="elements">
<p>Elementy</p>
<div id="list">
xxx<br />xxx<br />
abc<br />def<br />ghi<br />jkl<br />abc<br />def<br />ghi<br />jkl<br />abc<br />def<br />ghi<br />jkl<br />abc<br />def<br />ghi<br />jkl<br />
</div>
</div>
JS:
$(document).ready(function(){
$('div#elements').mCustomScrollbar({
axis:'y',
theme:'dark',
mouseWheel:{
enable:true,
scrollAmount:5
}
});
});
CSS:
div#elements {
background-color:#fff;
border:1px solid #000;
height:350px;
position:absolute;
right:10%;
top:20%;
width:230px;
z-index:2;
}
div#elements p {
border-bottom:1px solid #000;
cursor:default;
margin:0;
padding:8px 0;
text-align:center;
}
如果有人可以帮助我,我会等待消息。
好的,我找到了解决方案。 所以我必须使用concat版本的代码。
然后你将使用http://malihu.github.io/custom-scrollbar/jquery.mCustomScrollbar.concat.min.js ,但不能使用http://malihu.github.io/custom-scrollbar/jquery.mCustomScrollbar.min。 js 。 这很愚蠢,但它确实有效。
问候
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.