admin管理员组文章数量:1313011
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
本文标签: jqueryiPad takes three touch for JavaScript click eventStack Overflow
版权声明:本文标题:jquery - iPad takes three touch for JavaScript click event - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741831298a2399948.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论