# jquery-taphold

> A taphold event for jQuery.

Latest version **1.0.0** (published 2016-11-01) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install jquery-taphold
pnpm add jquery-taphold
yarn add jquery-taphold
bun add jquery-taphold
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-11-01 |
| First published | 2016-11-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Rich Adams |
| Maintainers | rek |

## Links

- npm: https://www.npmjs.com/package/jquery-taphold
- Repository: https://github.com/beak-lab/jquery-taphold
- Homepage: https://github.com/richadams/jquery-taphold#readme
- Issues: https://github.com/richadams/jquery-taphold/issues
- npm.io page: https://npm.io/package/jquery-taphold

## Recent versions

- 1.0.0 (latest) — 2016-11-01

## README

A taphold event for jQuery.

Click/tap and hold for 1s (default) on an element to trigger a taphold event. If you release before the 1s then a normal click event is triggered instead. If you drag outside of the element while holding, then no event is triggered.

Usage:

    $("#element").bind("taphold", function()
    {
        // Actions
    });

    // or

    $("#element").on("taphold", function()
    {
        // Actions
    });

You can combine the event with a click event but just also specifying a click event.

    $("#element").on("taphold", function()
    {
        // Actions for taphold
    })
    .on("click", function()
    {
        // Actions for normal click
    });

Or you can specify the click callback in the `clickHandler` option.

    $("#element").on("taphold",
                     {clickHandler: function() { // Do this on click. }},
                     function() { // Do this on taphold. });

You can change the duration by passing a new value as an option.

    $("#element").on("taphold", {duration: 2000}, function()
    {
        // Actions will trigger after 2s instead of the default of 1s.
    });

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