tap event fired after taphold.

tap event fired after taphold.

I am developing an app for iOS using Phonegap bundled with jQuery Mobile 1.1.1. I have a div on my page that is listening for both tap and taphold events.

The problem I am facing is that the tap event is fired after the taphold event once I lift my finger. How do I prevent this? A solution is provided here but is this the only way to do this? Kinda nullifies the whole point of having two different events for tap & taphold if you need to use a boolean flag to differentiate the two.

Following is my code:

  1. $('#pageOne').live('pageshow', function(event) {
  2.         $('#divOne').bind('taphold', function (event) {
  3.            console.log("TAP HOLD!!");    
  4.         });
  5.     
  6.         $('#divOne').bind('tap', function () {
  7.           console.log("TAPPED!!");
  8.         });
  9. });
Would greatly appreciate the help. Thanks!