Skip to content
A standalone javascript library for cross-browser mouse wheel support.
HTML JavaScript
Find file
Latest commit 546a574 Scott Boyle v1.1.2
Failed to load latest commit information.
README.md fix typos
bower.json v1.1.2
hamster.js v1.1.2
index.html fix typos
package.json v1.1.2

README.md

Hamster.js

A standalone javascript library for cross-browser mouse wheel support.

See it in action.

Usage

The event callback receives 3 extra arguments which are the normalized “deltas” of the mouse wheel.

Hamster(el).wheel(function(event, delta, deltaX, deltaY){
  console.log(delta, deltaX, deltaY);
});

Support

No jQuery or other libraries required, but an adpater for AngularJS is available.

Tested in these core browsers.

Install

bower install hamsterjs

Demo

monospaced.github.io/hamster.js

Reference

Something went wrong with that request. Please try again.