+ 3

How to make an onclick function delay before execution

29th Dec 2020, 11:55 AM
Iyosayi0x
Iyosayi0x - avatar
4 Respostas
+ 4
Mirielle[ Inactive ] I was precisely looking into this, thank you. I have written a memory game but the time control with SetTimeout is a mess. It mostly works (and it does in other codes) but handling touch events and calling methods, behaviour is sometimes unpredictable. I wonder if sticking to time system is the only way to ensure control.
29th Dec 2020, 6:47 PM
bell
bell - avatar
+ 1
Dexter 🐺 you can you the setTimeout function to delay function execution. Refer this link for details https://www.w3schools.com/jsref/met_win_settimeout.asp
29th Dec 2020, 11:59 AM
Art1mis