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

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

问题描述

仍然会触发双击事件的两次点击之间的最大延迟是多少?这种延迟在纯 JavaScript、jquery 和 AngularJS 之间会发生变化吗?

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

解决方案

连续两次点击被解释为双击所需的最大延迟没有标准化.

通常事件由浏览器触发,浏览器再次使用操作系统中设置的任何内容.
根据微软的说法,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天全站免登陆