IPad takes three touches for JavaScript click event

I have a problem with the iPad. I use 3 functions in JavaScript for the anchor tag, onmouseover, onmouseout, onclick.

But when I test it on the iPad, it launches for the first touch onmouseover, and then onclicktwo more touches are required to complete the event .

This means that the click event requires three touches. Usually it takes only two touches. Why is this so?

+5
source share
1 answer

To fully support mobile devices with touch screens, you cannot use mouse events ... you need to change to touch events

http://ross.posterous.com/2008/08/19/iphone-touch-events-in-javascript/

Another way is to split the code using a mobile platform like jQTouch , jQMobile , etc.

They support mouse events and touch events right out of the box.

Once you create code support for touch events, even drag and drop will work just fine

Drag and Drop on iPad

+7
source

All Articles