有没有一种方法,以消除在移动触摸设备的点击滞后? [英] Is there a way to remove the clicking lag on mobile touch devices?

查看:156
本文介绍了有没有一种方法,以消除在移动触摸设备的点击滞后?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在移动设备(新iPad,Galaxy Tab的)上浏览一个网站总是有当我点击(即使用javascript / jQuery的变成可点击常规链接或其他任何东西)的元素的滞后性。

When viewing a web site on a mobile device (iPad, Galaxy Tab) there's always a lag when I click an element (regular link or anything else that is made clickable using javascript/jquery).

在阅读网上,我发现浏览器使用touchstart随后touchend事件,之后它会触发定期click事件。有没有办法有一个更加敏感点击并删除被延迟的单击事件?也许通过使用JavaScript,或者其他什么东西?

While reading online, I found out that the browser is using touchstart followed by touchend events, and afterwards it triggers the regular click event. Is there a way to have a more responsive tap and remove the click event that is delayed? Maybe by using javascript, or something else?

推荐答案

如果你正在写一个网页你的自我,你可以注册一个监听器touchstart和touchend和触发的onclick code直接从触摸结束,没有任何延迟。

if you are writing a web page your self you can register a listener for touchstart and touchend and trigger the onclick code directly from on touch end without any delay.

如果你不`吨处理联系的情况下移动浏览器将派遣(有一定的滞后性)click事件的元素

If you don`t handle the event in touch move the browser will dispatch (with some lag) a click event to the element

看看从谷歌这样的描述打造快键:的 HTTP://$c$c.google.com/intl/de-DE/mobile/articles/fast_buttons.html

Take a look at this description from google to create "fast buttons": http://code.google.com/intl/de-DE/mobile/articles/fast_buttons.html

这篇关于有没有一种方法,以消除在移动触摸设备的点击滞后?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆