jquery-mousewheel

A jQuery plugin that adds cross-browser mouse wheel support.

jQuery Mouse Wheel Plugin

A jQuery plugin that adds cross-browser mouse wheel support.

In order to use the plugin, simply bind the “mousewheel” event to an element. It also provides two helper methods called mousewheel and unmousewheel that act just like other event helper methods in jQuery. The event callback receives three extra arguments which are the normalized “deltas” of the mouse wheel.

Here is an example of using both the bind and helper method syntax.

// using bind
$('#my_elem').bind('mousewheel', function(event, delta, deltaX, deltaY) {
    console.log(delta, deltaX, deltaY);
});

// using the event helper
$('#my_elem').mousewheel(function(event, delta, deltaX, deltaY) {
    console.log(delta, deltaX, deltaY);
});

License

This plugin is licensed under the MIT License (LICENSE.txt).

Copyright © 2011 Brandon Aaron

Related Repositories

jquery-mousewheel

jquery-mousewheel

A jQuery plugin that adds cross-browser mouse wheel support. ...

jquery-mousewheel-stop-propagation

jquery-mousewheel-stop-propagation

This jQuery plugin can prevent the scrolling of parent elements, or stop the propagation with the mousewheel event listener. ...

jquery-mousewheel

jquery-mousewheel

A jQuery plugin that adds cross-browser mouse wheel support. ...

jquery-mousewheel

jquery-mousewheel

A jQuery plugin that adds cross-browser mouse wheel support. This fork adds support for horizontal scrolling. ...