Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
894 views
in Technique[技术] by (71.8m points)

javascript - What is the max delay between two clicks to trigger a double-click event?

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...