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

touchtap-event

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

touchtap-event

Adds a "touchtap" custom event which responds to touch only

  • 2.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
325
decreased by-39.37%
Maintainers
1
Weekly downloads
 
Created
Source

touchtap-event

Build Status

A lightweight JavaScript library that adds a touchtap custom event to the document which can be listened to on any element. This will only emit an event on touch enabled devices or those emulating touch devices.

It works by listening to various touch events to dispatch the event if the touchstart and touchend events were in approximately the same position and took <= 200ms.

Installing

# via bower
bower install --save touchtap-event

# via NPM
npm install --save touchtap-event

Including

<!-- Bower -->
<script src="bower_components/touchtap-event/touchtap-event.js"></script>

<!-- NPM -->
<script src="node_modules/touchtap-event/touchtap-event.js"></script>

Usage

var elem = document.querySelector('#some-element');
elem.addEventListener('touchtap', function (e) {
  console.log(e);
});

See also

Keywords

FAQs

Package last updated on 10 Dec 2016

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