'mousewheel' Special Event
Categories: Mouse Events
.on( 'mousewheel', ... )
Plugin: jQuery.event.special.mouse
Description: Bind special event on mouse wheel.
-
.on( 'mousewheel', ... )
version added: 1.0
This .on()
implements a simple cross browser bind to the mousewheel
interaction.
The mousewheel
event isn't the same as onscroll
event. The mousewheel
event fires if the user rotate the mousewheel
or use the scroll handling of a trackpad.
The recieved event object on mousewheel
includes advanced properties:
- event.wheelDelta A float value which represents the scroll step distance position on y- or x-axis.
- event.wheelDeltaX A float value which represents the scroll step distance on the x-axis.
- event.wheelDeltaY A float value which represents the scroll step distance on the y-axis.
- Attention not all browser supports separate wheelDelta for x- and y-axis.
See the .on() and .off() method references for a way to bind/unbind event handlers.