Custom scrollbar - mouse wheel too slow

I am working on a site that contains a div with a custom scrollbar. My problem is that the mouse wheel is not working properly, it is too slow.

The site is http://alaaelseifi.net/ , and the special scroll library is http://manos.malihu.gr/

The script looks like this:

$(window).load(function() { $(".scroll-pane").mCustomScrollbar(); //code that make scrolling with mouse faster }); 
+6
source share
5 answers

You can set the scroll speed in the parameters as described in the scoll library documentation: http://manos.malihu.gr/jquery-custom-content-scroller/

I think you are looking for something like this:

 $(".scroll-pane").mCustomScrollbar({ mouseWheelPixels: 50 //change this to a value, that fits your needs }) 

Just play around with the value until scolling is as fast as you need it.

+17
source

I also noticed that the β€œslow” feeling on my site was due to the fact that scroll inertia is turned on by default if you use the following: it will disable this and make the panel keep up with the attempt:

 $(".scroll-pane").mCustomScrollbar({ scrollInertia: 0 }); 
+13
source

As Melinda mentioned, scrollInertia does the trick, but instead of turning it if it's completely off, you can tweak it to make it faster, but still smooth. Disabling completely made the scroll too nervous of my own free will and made her jump in many ways. This made it impossible to access certain parameters.

I found that 60 ms is the perfect setting:

 $(".mCustomScrollbar").mCustomScrollbar({ scrollInertia: 60, }); 

As the docs say:

Set the amount of scroll as the duration of the animation in milliseconds. A higher value is equal to a large scrolling pulse, which translates into a smoother / more progressive animation. Set to 0 to disable.

+4
source

This works for me.

 $("#scroll").mCustomScrollbar({ mouseWheelPixels: 170, autoDraggerLength:false }); 
+1
source

it worked for me, although I had to combine the two answers here,

 scrollInertia: 0 mouseWheelPixels: 170, autoDraggerLength:false, 
+1
source

All Articles