Get mouse wheel events in jQuery?

前端 未结 14 1219
旧巷少年郎
旧巷少年郎 2020-11-22 13:26

Is there a way to get the mouse wheel events (not talking about scroll events) in jQuery?

14条回答
  •  盖世英雄少女心
    2020-11-22 13:38

    use this code

     knob.bind('mousewheel', function(e){  
     if(e.originalEvent.wheelDelta < 0) {
        moveKnob('down');
      } else {
        moveKnob('up');
     }
      return false;
    });
    

提交回复
热议问题