Web Depot: Hammering Out Gesture Controls

Stephen Yagielowicz

The move to mobilization is motivating many website designers to adopt gesture controls for easier access and navigation by mobile device users. Enter Hammer.js, an open source JavaScript library that recognizes user gestures made by touch, mouse, or pointer event. The script does not have any dependencies, and is very lightweight, at only 3.96kb when minified and gzipped.

Completely rewritten to provide reusable gesture recognizers along with improved support for the most recent mobile browsers, Hammer.js makes use of the touch-action CSS property whenever possible, and supports multiple Hammer instances at the same time to allow multi-user interaction. The script is easy to use, and only requires the inclusion of the library and the creation of a new instance.

By default, Hammer.js adds gesture recognizers for tap, double tap, press, horizontal pan and swipe, and optionally for multi-touch pinch and rotation, as well as vertical pan and swipe recognizers and custom gesture recognizers as well.

Related:  

More Articles

opinion

How to Safely Buy a Pre-Owned Adult Domain

Adrian DeGus ·
profile

WIA Profile: Ruth Blair

Women In Adult ·
profile

New Kids on the Block: FuckingAwesome.com

Rhett Pardon ·
trends

Mandatory Age Verification: A Game Changer for Adult

Stephen Yagielowicz ·
trends

The European Legal Scene: Challenges, Opportunities in 2017

Stephen Yagielowicz ·
trends

Euro Trends: Evolving a Unique Marketplace

Stephen Yagielowicz ·
profile

Q&A: Yanks.com Flourishes With Commander Todd Spaits

Alejandro Freixes ·
opinion

After a Long Summer, It Is Back to Work

Mitch Platt ·
opinion

The Adult Industry Can No Longer Be an Island

Eric Paul Leue ·
Show More