Socket
Socket
Sign inDemoInstall

clicktap

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    clicktap

A JavaScript library to prevent the 300ms click delay on touch devices.


Version published
Weekly downloads
5
decreased by-28.57%
Maintainers
1
Install size
23.9 kB
Created
Weekly downloads
 

Readme

Source

clicktap Build Status devDependency Status

A JavaScript library to prevent the 300ms click delay on touch devices.

Installation

$ npm install clicktap

$ bower install clicktap

$ component install pazguille/clicktap

Usage

<button id="btn">Click me</button>
function litenerFunction() {
  // Some code here!
}

var btn = document.getElementById('btn');

clicktap(btn, litenerFunction);

API

clicktap(el, listener, [capture]);

clicktap.on(el, listener, [capture]);

Adds a listener to a given HTMLElement on click/tap event.

  • el {HTMLElement} - A given HTMLElement.
  • listener {Function} - A given listener to execute on click/tap.
  • capture {Boolean} - Indicate if use capture path.
clicktap(document, litenerFunction, true);

// or

clicktap.on(document, litenerFunction);

clicktap.off(el, listener);

Removes a listener from a given HTMLElement.

  • el {HTMLElement} - A given HTMLElement.
  • listener {Function} - A given listener to execute on click/tap.
clicktap.off(document, litenerFunction);

Made and maintained with ❤ by

License

MIT license. Copyright © 2014.

Keywords

FAQs

Last updated on 12 Nov 2014

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc