madrobby/zepto — Issue #409: Fallback to click event for tap event on Desktop
Author: mech
Created: 2012-02-27 03:56:28+00:00
State: open

As per what Spine Mobile is doing, for all tap events, will fall back to click events on the desktop if possible.

if ('ontouchstart' in window) {
$('body').bind('click', function(e) {
return e.preventDefault();
});
} else {
$(function() {
return $('body').bind('click', function(e) {
return $(e.target).trigger('tap');
});
});
}

Not sure if worth it, or if there is a better way in Zepto to fallback?

Regards,
mech