Custom scrollbar - mouse wheel too slow

26,727

Solution 1

You can set the speed of scrolling in the options as described in the scoll libraries documentation here: http://manos.malihu.gr/jquery-custom-content-scroller/

I think what you are looking for is 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.

Solution 2

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 turn that off and cause the bar to not lag trying :

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

Solution 3

As Melinda mentioned, scrollInertia does the trick, but rather than turning if off completely, you can adjust it to make it faster, but still smooth. Turning it off completely made the scrolling too jumpy for my liking, and made it jump over many options. That made it impossible to get to some options.

I found that 60ms was an ideal setting:

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

As the docs say:

Set the amount of scrolling momentum as animation duration in milliseconds. Higher value equals greater scrolling momentum which translates to smoother/more progressive animation. Set to 0 to disable.

Solution 4

This worked for me.

scrollInertia: 0
mouseWheelPixels: 170,
autoDraggerLength:false,

Solution 5

This works for me.

$("#scroll").mCustomScrollbar({
   mouseWheelPixels: 170,
   autoDraggerLength:false 
});
Share:
26,727
Husamuddin
Author by

Husamuddin

Updated on February 11, 2021

Comments

  • Husamuddin
    Husamuddin about 3 years

    I'm working on a site which contains a div with a custom scroll bar. My problem is that the mouse wheel doesn't work properly, it's too slow.

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

    The script issupposed to be like this:

    $(window).load(function() {
        $(".scroll-pane").mCustomScrollbar();
        //code that make scrolling with mouse faster
    });
    
  • Husamuddin
    Husamuddin about 11 years
    that's what I needed exactly :)
  • Jeff
    Jeff about 9 years
    This is great! I ended up setting mine to 500.
  • Christopher
    Christopher over 7 years
    Thanks mate. I have the same problems. Rather saying it is "slow", it is actually with "slow deacceleration" only.
  • dude
    dude over 7 years
    I've defined 250 as this is more "Firefox"-like