0.0.3 • Published 9 years ago

clicktap v0.0.3

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

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.

0.0.3

9 years ago

0.0.2

10 years ago

0.0.1

10 years ago