-
Notifications
You must be signed in to change notification settings - Fork 41
Description
I'm still rather new to doing complex Javascript development, so using this to eliminate onClick delay for a PhoneGap/jQuery Mobile app has been great. But I've run into an issue:
At the moment, this code doesn't seem to accommodate a taphold event. In my code, I bind to taphold for an item. But this never fires if I set a fastClick event for it as well. Ideally, I'd like to be able to have both co-existing, so a user can tap to go to a new page, or taphold to bring up a dialog.
Is this possible? If nothing else, could it not filter out touchstart events that have a touchend event after a set threshold? Just a thought. Thanks!
Example Code:
$('a.cat').bind('taphold', function (e) {
$( "#homeDialog" ).popup( "open" );
});
$('a.cat').fastClick(function(e) {
$.mobile.changePage("categoryPage.html", {transition: "slide"});
});
fastClick fires, but taphold does not, no longer how long the tap is held for.