A javascript library for multi-touch gestures :// You can touch this
JavaScript HTML CSS
Latest commit 37206a3 Apr 19, 2017 @jtangelder jtangelder committed on GitHub Update LICENSE.md
Permalink
Failed to load latest commit information.
src chore: moves 'defaults' out of the constructor Sep 30, 2016
tests chore(test cleanup): Add missing messages to asserts Sep 30, 2016
.bowerrc add support for component as well as bower Mar 15, 2013
.editorconfig chore: fix styling issues and lints tests Sep 30, 2016
.gitignore hammer 2.0 Jul 11, 2014
.jscsrc chore: fix styling issues and lints tests Sep 30, 2016
.jshintrc chore: fix styling issues and lints tests Sep 30, 2016
.travis.yml chore: saner npm tasks Sep 30, 2016
CHANGELOG.md Changelog: Fix formatting for new markdown processor on jekyll site Apr 23, 2016
CONTRIBUTING.md simulator and jquery plugin in package.json Jul 26, 2014
LICENSE.md Update LICENSE.md Apr 19, 2017
README.md chore(bye Grunt): removes Grunt, its plugins and other related stuff … Sep 30, 2016
banner.ejs feat(npm scripts): adds npm scripts Sep 30, 2016
bower.json Merge pull request #1013 from anotheredward/patch-1 Oct 19, 2016
changelog.js Changelog: update for 2.0.8 Apr 23, 2016
component.json Build: Prepare 2.0.6 release Dec 24, 2015
hammer.js chore(build): Commiting most recent built files Sep 30, 2016
hammer.min.js chore(build): Commiting most recent built files Sep 30, 2016
hammer.min.js.map chore(build): Commiting most recent built files Sep 30, 2016
hammer.min.map Build: Prepare 2.0.6 release Dec 24, 2015
package.json chore(rollup version): bumps up rollup version Oct 15, 2016
rollup.config.js chore(rollup version): bumps up rollup version Oct 15, 2016
string-replace.js chore: various fixes after rebase. Sep 30, 2016

README.md

Hammer.js 2.0.6

Build Status

Support, Questions, and Collaboration

Slack Status

Documentation

Visit hammerjs.github.io for detailed documentation.

// get a reference to an element
var stage = document.getElementById('stage');

// create a manager for that element
var mc = new Hammer.Manager(stage);

// create a recognizer
var Rotate = new Hammer.Rotate();

// add the recognizer
mc.add(Rotate);

// subscribe to events
mc.on('rotate', function(e) {
    // do something cool
    var rotation = Math.round(e.rotation);    
    stage.style.transform = 'rotate('+rotation+'deg)';
});

An advanced demo is available here: http://codepen.io/runspired/full/ZQBGWd/

Contributing

Read the contributing guidelines.

For PRs.

  • Use Angular Style commit messages
  • Rebase your PR branch when necessary
  • If you add a feature or fix a bug, please add or fix any necessary tests.
  • If a new feature, open a docs PR to go with.

Building

You can get the pre-build versions from the Hammer.js website, or do this by yourself running npm install && npm run build