package
jQuery plugin creating a wheel event based on DOM3 wheel event
npm install jquery-wheelGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
jQuery plugin creating a wheel event based on DOM3 wheel event: http://www.w3.org/TR/DOM-Level-3-Events/#event-type-wheel. It uses native wheel event under the hood.
NOTE: This plugin only provides basic functionality of the native wheel event and proxies its relevant properties (like deltaY) to the main jQuery event object. For more advanced functionality (like always converting the value to pixels, supporting older browsers etc.) use the jquery-mousewheel plugin.
To provide consistency with the rest of jQuery mouse events, this plugin defines the following fields on the jQuery wheel event:
Example usage:
$(element).on('wheel', function (evt) {
if (evt.deltaY > 0) { /* zooming out */ }
else { /* zooming in */ }
});Works with jQuery 1.7.0+.
The following browsers are supported:
The plugin should work in most older non-IE browsers, too, but it's not tested against those versions.