Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/component/double-tap
double tap on elements. handles both double tap and double click.
https://github.com/component/double-tap
Last synced: 13 days ago
JSON representation
double tap on elements. handles both double tap and double click.
- Host: GitHub
- URL: https://github.com/component/double-tap
- Owner: component
- Created: 2013-08-23T20:21:37.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-03-16T21:34:51.000Z (almost 10 years ago)
- Last Synced: 2024-11-20T20:47:30.990Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 133 KB
- Stars: 1
- Watchers: 7
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# double-tap
double tap on elements. handles both double tap and double click.
## Installation
Install with [component(1)](http://component.io):
$ component install component/double-tap
## Example
```js
doubletap(box, function(e) {
box.style.backgroundColor = randomColor();
});
```## API
### doubletap(el, fn)
Initialize `Doubletap`.
### doubletap.unbind()
Unbind `Doubletap`
## TODO
- normalize the event object in `component/tap`. right now depending on if the device supports touch or not, the event object will be different (ex. no `e.pageX` on mobile)
- instead of handling click in doubleclick, move click logic to `component/tap`
## License
MIT