Package Exports
- hamsterjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (hamsterjs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Hamster.js
A standalone javascript library for cross-browser mouse wheel support.
Usage
The event callback receives 3 extra arguments which are the normalized “deltas” of the mouse wheel.
var hamster = Hamster(el);
hamster.wheel(function(event, delta, deltaX, deltaY){
console.log(delta, deltaX, deltaY);
});
// destroy
hamster.unwheel();
Support
No jQuery or other libraries required, but an adapter for AngularJS is available.
Tested in these core browsers.
Install
bower install hamsterjs
Demo
monospaced.github.io/hamster.js