I am using a event normalizer for the mouse events and the touch events. That way, I don't need to maintain 2 pieces of code : one that responds to the touch events and the other one to the touch events.
It works fine, but I cannot have it to work with the live() function.
At the end of the normalization process, the normalized event is triggered this way:
var touchMouseEvent = normalizeEvent(type, event, event.pageX, event.pageY);
$(event.target).trigger(touchMouseEvent);
I tried to have the live event to work using those calls:
$('.MyClass').live('TouchMouseEvent', function(){...});
$('.MyClass').live('normalizeEvent', function(){...});
$('.MyClass').live('touchMouseEvent', function(){...});
but NOTHING WORKS.
Typically, the trigger for custom events are called as a string like $('.Class').trigger('customName'), so I wonder if this is why I am struggling with that.
Here is the code I using for the normalization. https://gist.github.com/2375726
Thanks!