Last active
March 9, 2018 20:27
-
-
Save interactiveRob/1c024999f9ee433a97cef36690998a50 to your computer and use it in GitHub Desktop.
run function after a delay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setTimeout(function(){ | |
//do something after 600 milliseconds | |
}, 600); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use this function to delay 600ms before executing your desired code. Having trouble? Read through your JS more and make sure this function is executed when you want it to run. Can be used inside any other functions, e.g. onclick functions.