Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
877 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 Answer

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...