I don't want to disable the mouse scroll. I want to disable the click on the mouse wheel to scroll by moving the mouse up or down.
I've managed to do it for Chrome, IE, Opera and Safari, but not for Firefox.
Here's what I've used:
$(document).mousedown(function(e) {
if(e.button == 1){ //also tried with if(e.which == 2){
e.preventDefault();
return false;
}
});
Live demo
You can disable this functionality by going to "about:config" and changing "general.autoScroll" to "false" (double-click on the record).
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