0

how can I disable mouse a wheel click only in a certain div? I want to use the scroll function normally, but I don't want to switch the cursor to that "quick scroll" when someone clicks the mouse wheel.

I tried this, but it has changed nothing

$(document).on('click', function(e){
    if(e.which == 2){
        e.preventDefault(); //stop default click action from mousewheel
    }
});
ventraks
  • 15
  • 3
  • You maybe are looking for this https://developer.mozilla.org/en-US/docs/Web/API/Element/auxclick_event and you may find this question useful https://stackoverflow.com/questions/1795734/triggering-onclick-event-using-middle-click anyway I’m not familiar with that – Diego D Dec 02 '22 at 22:24

0 Answers0