To accelerate my app, I changed all my click event to tap event like
that :
$('a.myClass').bind('tap click', function(e) { ... });
But now, I got some strange bugs, and it's difficult to explain it in
english for me :
I have a button, and clicking on it replace this button by another
one.
But the tap event is also fired for the new button. So, for one "tap"/
click, the callback for the first button and the second callback are
launched.
Is there anything I can do ?
Best,
Dave
Just use:
$('#mylinks a').tap(myCallback);
instead of $('#mylinks a').click(myCallback) or .bind('click', myCallback)
Best,
Dave
You where right, it's the click event that is fired after the tap
event.
To solve that, I used
$('a.myClass').bind(clickTouchEvent, function(e)
With clickTouchEvent a string with tap if I am on the iPhone, or click
if I am on safari on my mac :
clickTouchEvent = isIPhone ? 'tap' : 'click'