I’m trying to replace the eventtype with a custom eventtype…
$(function() {
$("#control").bind("myTouch", function(e) {
b = e.originalEvent.touches.length
});
$("#anothercontrol").bind("touchstart", function(e) {
a = e.originalEvent.touches.length
$("#control").trigger("myTouch"); }
});
});
a = the correct number and b = null??
Below seems to work (I guess it goes back to the way jQuery parses the touch events):