0.0.1 • Published 10 years ago
longtap v0.0.1
Longtap
A module to support long tap event, longtap should not be triggered when:
- more than one finger on the screen
- touch event fired during the hold
Install
npm i longtap -SExample
var longtap = require('longtap')
el.addEventListener('touchstart', longtap(function(e) {
console.log('fired')
}), false)API
Longtap(handler, option)
handleris event hanlder fortouchstarteventoption.thresholdset the timeout to call the hanlder
handler is called with the save context and arguments as touchstart
0.0.1
10 years ago