hamster.js

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

  • Owner: monospaced/hamster.js
  • Platform:
  • License::
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

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.

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

Reference

Main metrics

Overview
Name With Ownermonospaced/hamster.js
Primary LanguageHTML
Program languageJavaScript (Language Count: 2)
Platform
License:
所有者活动
Created At2013-03-21 14:52:29
Pushed At2020-03-31 10:33:09
Last Commit At2018-02-22 22:17:41
Release Count9
Last Release Namev1.1.3 (Posted on )
First Release Namev1.0.1 (Posted on )
用户参与
Stargazers Count180
Watchers Count4
Fork Count29
Commits Count35
Has Issues Enabled
Issues Count13
Issue Open Count2
Pull Requests Count4
Pull Requests Open Count3
Pull Requests Close Count2
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private