I have problem with iPad. I use 3 function in JavaScript for anchor tag, onmouseover
, onmouseout
, onclick
.
But when I test it on the iPad then for first touch it trigger onmouseover
, and then it takes two another touch for execute onclick
event.
That means it take total three touch for click event. Generally it has to take only two touch for it. Why is it so?
I have problem with iPad. I use 3 function in JavaScript for anchor tag, onmouseover
, onmouseout
, onclick
.
But when I test it on the iPad then for first touch it trigger onmouseover
, and then it takes two another touch for execute onclick
event.
That means it take total three touch for click event. Generally it has to take only two touch for it. Why is it so?
Share Improve this question edited Sep 30, 2012 at 17:10 Parixit asked Sep 29, 2011 at 12:53 ParixitParixit 3,8553 gold badges39 silver badges63 bronze badges1 Answer
Reset to default 7To fully support Mobile devices with their Touch Screens you can't use the mouse events... you need to change to touch events
http://ross.posterous./2008/08/19/iphone-touch-events-in-javascript/
Another way is to divide the code using a mobile Framework, like jQTouch, jQMobile, etc...
They support Mouse Events and Touch Events right out of the box.
After you make your code support for Touch Events, even Drag and Drop will work nicely
Drag and drop on iPad