All Projects → anvaka → wheel

anvaka / wheel

Licence: MIT license
Mouse wheel event unified for all browsers

Programming Languages

javascript
184084 projects - #8 most used programming language

wheel

I don't think you need to use this library anymore. Use this instead:

element.addEventListener('wheel', ...);

In 2014 this module was supposed to unify handling of mouse wheel event across different browsers.

Now it's just a wrapper on top of element.addEventListener('wheel', callback).

Usage

var addWheelListener = require('wheel').addWheelListener;
var removeWheelListener = require('wheel').removeWheelListener;
addWheelListener(domElement, function (e) {
	// mouse wheel event
});
removeWheelListener(domElement, function);

You can also use a shortcut for addWheelListener:

var addWheelListener = require('wheel');
addWheelListener(domElement, function (e) {
	// mouse wheel event
});

install

With npm do:

npm install wheel

license

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].