Execute code on the element tap!
You need jQuery to use this!
You can start listening for the 'tap' event like this:
$(function(){
$('#someBlock').tap(function(){ doSomething(); });
});
To unsubscribe from all tap events on the block use the 'off' parameter:
$(function(){
$('#someBlock').tap('off');
});
You can call all callbacks just as simple:
$(function(){
$('#someBlock').tap();
});
You can also set two options for the plugin:
delay (default: 200)
Allowable value in milliseconds between the 'touchstart' and 'touchend' events to call your function
offset (default: 4)
Allowable offset in pixels between the 'touchstart' and 'touchend' positions to call your function
$(function(){
$('#someBlock').tap(function(){ console.log('Tapped', this); }, {delay: 1000, offset: 10});
});