Touchstart与点击。发动机罩下会发生什么? [英] Touchstart vs Click. What happens under the hood?

查看:120
本文介绍了Touchstart与点击。发动机罩下会发生什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,请原谅,这不是一个编程问题,但我认为它不适合理论CS CS非编程仍处于私人测试版。

First, excuse me please, this is not a programming question, but I think it wont fit to Theoretical CS, and CS Non Programming is still in private Beta.

更新我的phonegap应用程序以听取

after updating my phonegap Applications to listen to


$(selector).bind(touchstart,function());

$(selector).bind("touchstart",function());

而不是


$(selector).click function());

$(selector).click(function());

(这里用jquery),性能明显改善,我想知道touchstart有什么不同,的事实,它可能是专为移动设备环境设计的。我查找了 w3c文档 on touchstart,但它不提供任何信息。

(here with jquery),and the performance improved remarkably, I want to know what touchstart does different, despite of the fact that it is probably designed especially for mobile devices environments. I looked up the w3c document on touchstart, but it doesnt provide any information.

如果任何人有链接进一步解释或可以解释它的工作原理,我非常感谢它

if anyone has a link to further explanation or can explain how it works, I greatly appreciate it

推荐答案

在iPhone上,touchstart事件会在手指触摸屏幕时触发,而点击事件在触摸屏幕后触发300 ms并抬起手指离开屏幕。 300毫秒的时间延迟是这样,Safari可以等待看看你是否打算双击屏幕连续模拟缩放手势。

On the iPhone the touchstart event fires as soon as your finger touches the screen, whereas the click event fires 300 ms after you touch the screen and lift you finger off the screen. The 300 ms time delay is so that Safari can wait to see if you intend to double tap the screen in succession to simulate the zoom gesture.

这篇关于Touchstart与点击。发动机罩下会发生什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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