I'm searching solution for my problem but i can't find it. So I downloaded jQuery plugin (mCustomScrollbar) and everything is fine without one thing - i can't scroll by mousewheel in my test page. Console is clear, examples from author works. I try run my code in latest Firefox and Chrome, but code is not working.
My code:
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;
}
If anyone can help me i will waiting for message.
Okay, i find solution. So i must using concat version of code.
Then you will use http://malihu.github.io/custom-scrollbar/jquery.mCustomScrollbar.concat.min.js, but not http://malihu.github.io/custom-scrollbar/jquery.mCustomScrollbar.min.js. It's stupid but it works.
Regards
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With