# xtap-event

> A custom tap event JavaScript plugin for mobile and tablet web browsers

Latest version **1.0.1** (published 2015-09-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install xtap-event
pnpm add xtap-event
yarn add xtap-event
bun add xtap-event
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2015-09-04 |
| First published | 2015-09-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 348 |
| Author | Alex Gibson |
| Maintainers | royriojas |
| Keywords | javascript, tap, touch, event |

## Links

- npm: https://www.npmjs.com/package/xtap-event
- Repository: https://github.com/alexgibson/tap.js
- Issues: https://github.com/alexgibson/tap.js/issues
- npm.io page: https://npm.io/package/xtap-event

## Dependencies (1)

- [dom-event-special](https://npm.io/package/dom-event-special.md) ^0.1.6

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2015-09-04

## README

tap.js
=======================================

A custom 'tap' event JavaScript plugin for mobile and tablet web browsers, which eliminates the 300ms delay between a physical 'tap' and the firing of a 'click' event. Uses mouse events as a fallback for browsers that don't support touch.

Installation
---------------------------------------

* Download: [zip](https://github.com/alexgibson/tap.js/zipball/master)
* [NPM](https://www.npmjs.org/): `npm install tap.js`
* [Bower](https://github.com/twitter/bower/): `bower install tap.js`
* Git: `git clone https://github.com/alexgibson/tap.js`

Setup
---------

This component can be used as an AMD module, CommonJS module, or a global.

### for AMD module:
```
define(['./tap'], function(Tap) {
    // ...
});
```

### for CommonJS:
```
var Tap = require('tap.js');
```

### for global in the browser

```
<script src="tap.js"></script>
```

Next create a new Tap instance, passing the element you want to use:

```
var el = document.getElementById('my-id'),
	myTap = new Tap(el);
```

You can then start listening for 'tap' events using the regular JavaScript event listener syntax:

```
el.addEventListener('tap', onTap, false);

function onTap (e) {
	//your code
}
```

You can stop listening for tap events like so:

```
el.removeEventListener('tap', onTap, false);
```

Supported web browsers
---------------------------------------

- iOS (Safari, Chrome)
- Android (Browser, Chrome)
- Firefox OS, Firefox for Android
- Opera Mobile (Android)
- BlackBerry Playbook
- All modern desktop browsers (mouse fallback)

jQuery Support
---------------------------------------

Should you wish to use tap.js with jQuery, there is an optional [jQuery wrapper](https://github.com/alexgibson/tap.js/blob/master/jquery.tap.js) that you can include in your project.

---
_Source: https://npm.io/package/xtap-event · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
