# onclick

> A click controller for mouse & touch.

Latest version **0.1.0** (published 2014-03-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install onclick
pnpm add onclick
yarn add onclick
bun add onclick
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2014-03-26 |
| First published | 2014-02-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Brian Peacock |
| Maintainers | bpeacock |

## Links

- npm: https://www.npmjs.com/package/onclick
- Repository: https://github.com/bpeacock/onClick
- npm.io page: https://npm.io/package/onclick

## Dependencies (1)

- [unopinionate](https://npm.io/package/unopinionate.md) 0.0.x

## Recent versions

- 0.1.0 (latest) — 2014-03-26
- 0.0.3 — 2014-03-18
- 0.0.2 — 2014-03-11
- 0.0.1 — 2014-02-23

## README

onClick.js [![Build Status](https://travis-ci.org/bpeacock/onClick.png?branch=master)](https://travis-ci.org/bpeacock/onClick)
===============

A click controller for mouse & touch.

- Prevents 300ms delay on touch
- Touch interactions like scrolling work as expected
- Handles devices that have both touch and mouse
- Delegates events for efficiency

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

```bash
npm install onclick
```

A jQuery-like selector library is required:
- jQuery 1.4.3+
- Zepto

Usage
-----

```javascript
onClick({
    '#element': function(e) {
        alert("I was clicked!");
    }
});

onClick('.myclass', function() {

});
```

Check out a live [example](http://htmlpreview.github.io/?https://github.com/bpeacock/onClick/blob/master/examples/index.html).

Development
-----------

To Build:   `grunt build`

To Develop: `grunt watch`

To Test:    `npm test`

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