I am binding live events on links in my PhoneGap app. The event does fire successfully (confirmed by alert()ing), but it seems any touch data is not attached to the event object like it should be. This happens on all touch events – touchstart, touchmove, and touchend.
$('a').live('touchend', function(event) { event.preventDefault(); alert(event.touches.length); // event.touches should be populated! });
Any ideas? Am I SOL with jQuery.live()?
The touch events are not currently supported by Events/live.
From the documentation:
You might want to consider trying to use click if that will suit your needs, or you can switch to using livequery, which probably will support it. (livequery is what live was originally based on, I’m not sure why it doesn’t support all of the same events)