Skip to content
The mouse wheel event (y axis).
CoffeeScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Readme.md
bower.json
package.json
wheelevent.coffee
wheelevent.js

Readme.md

wheelevent.js

The mouse wheel event (y axis).

Usage

Download or install by

bower install wheelevent.js

then

<script src="wheelevent.js"></script>
<script>
window.onload = function(){
  var target = document.getElementById('target');
  var onWheel = function(event, delta){
    console.log(delta);
  };
  wheelevent(target, onWheel);
};
</script>

Compatibility

  • IE5+(checked by IE11 emulate)
  • Firefox
  • Google Chrome

Since event is raw, delta value magnification is different in each browsers.

License

(C) 2015 Narazaka : Licensed under The MIT License - http://narazaka.net/license/MIT?2015

Something went wrong with that request. Please try again.