两次触发一次双击事件之间的最大延迟是多少? [英] What is the max delay between two clicks to trigger a double-click event?

查看:137
本文介绍了两次触发一次双击事件之间的最大延迟是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

仍然会触发双击事件的两次单击之间的最大延迟是多少?这种延迟是否会在普通JavaScript,jquery和AngularJS之间发生变化?

类似地,在jquery中,快速和慢速关键字对应于什么时间?例如,我可以使用$(this).hide("slow");$(this).hide("fast");.有没有办法更改快速和慢速的默认值?

解决方案

连续两次单击被解释为双击所需的最大延迟时间尚未标准化.

通常,事件由浏览器触发,浏览器再次使用操作系统中设置的内容.
根据Microsoft的说法,Windows中的默认计时为500毫秒(半秒),其他操作系统可能会有其他延迟,并且大多数操作系统都有可由用户更改的设置.

对于jQuery,它位于文档中,动画速度的值如下

快速:200
正常:400
慢:600

What is the maximum delay between two clicks that will still trigger a double-click event? Does this delay change between plain JavaScript, jquery, and AngularJS?

Similarly, in jquery what timings do the fast and slow keywords correspond to? For example, I can use either $(this).hide("slow"); or $(this).hide("fast");. Is there a way to change the default values for fast and slow?

解决方案

The maximum delay required for two consecutive clicks to be interpreted as a double-click is not standardized.

Generally the events are fired by the browser, and the browser again uses whatever is set in the OS.
According to Microsoft, the default timing in Windows is 500ms (one half second), other operating systems can have other delays, and most have settings that can be changed by the user.

For jQuery, it's in the documentation, the values for the animation speed is as follows

fast : 200
normal : 400
slow : 600

这篇关于两次触发一次双击事件之间的最大延迟是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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