Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

zepto.touch

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zepto.touch

a zepto/jquery touch events plugin

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
33
decreased by-21.43%
Maintainers
1
Weekly downloads
 
Created
Source

zepto.touch npm package

a zepto/jquery touch events plugin, it provides touch events like tap,doubleTap,longTap,swipe,swipeLeft,swipeRight,swipeUp,swipeDown.

installation

use npm:

npm install zepto.touch

use bower:

bower install zepto.touch

usage

the api is the same as zepto/jquery events, but it also provides setting method, you must write the setting method $.fn.touch before the touch events, eg:

$('ul').touch({
	swipeMove: function (e, direction, distance, duration) {
		console.log(e, direction, distance, duration);
	}
}).on('swipe', 'li', function (e, direction) {
	console.log(e, direction);
}).on('tap.test', function (e) {
	console.log('tap.test');
}).on('tap', function (e) {
	console.log('tap');
	$(this).off('tap.test');
});

options

$.fn.touch.defaults = {
    fingers: 1,
    threshold: 75,
    longTapThreshold: 500,
    doubleTapThreshold: 200,
    excludedElements: 'label, button, input, select, textarea, .noTouch',
    pageScroll: true,
    swipeMove: null
};

Keywords

FAQs

Package last updated on 08 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc