# prevent-touch

> jQuery plugin to help prevent instant navigation on touch enabled device, great for css styled dropdowns/hover states

Latest version **1.0.0** (published 2017-10-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install prevent-touch
pnpm add prevent-touch
yarn add prevent-touch
bun add prevent-touch
```

## 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.0 |
| Published | 2017-10-07 |
| First published | 2017-10-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | dj10dj100 |
| Maintainers | dj10dj100 |
| Keywords | jquery, prevent, touch, mobile, tablet, hover |

## Links

- npm: https://www.npmjs.com/package/prevent-touch
- Repository: https://github.com/dj10dj100/preventTouch
- Homepage: https://github.com/dj10dj100/preventTouch#readme
- Issues: https://github.com/dj10dj100/preventTouch/issues
- npm.io page: https://npm.io/package/prevent-touch

## 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.0 (latest) — 2017-10-07

## README

[![npm](https://img.shields.io/npm/dm/prevent-touch.svg)]()
[![npm](https://img.shields.io/npm/dt/prevent-touch.svg)]()
[![npm](https://img.shields.io/npm/v/prevent-touch.svg)]()

# <a href="https://github.com/dj10dj100/preventTouch">jQuery prevent-touch</a>
===========

Hover states on mobile devices can be tricky and this is just another module designed to help with building touch ready interfaces with web technologies .

This plugin is designed to help with preventing the initial navigation on a href when there is a hover state applied with css. Unique I know, but these things happen...
Also, there is plenty of other ways to solve the problems this could solve, not using `<a>` tags with css state etc.

This is a jQuery plugin, so there is a hard dependency on jQuery being available in the current scope. 


```javascript
import 'prevent-touch';
```
--------------------
Basic Example
--------------------

``` html
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

<a class="test" href="#tested">preventTouch</a>
<a class="test" href="#tested">preventTouch</a>
<a class="test" href="#tested">preventTouch</a>
<a class="test" href="#tested">preventTouch</a>
<a class="test" href="#tested">preventTouch</a>
```

```javascript
	$('.test').preventTouch({
		ios : true
	});
```

All elements with <b>.test</b> class will need to be pressed twice for the navigation to happenon an ios device.

--------------------
## Options
--------------------

<b> You can spec what devices to make the plugin run on if needs be </b>

```javascript
$('.test').preventTouch({
    ios : true,
    android : true,
    blackberry : true,
    windows : true,
    opera : true,
    any : true
});
```

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