Is there any JavaScript method similar to the jQuery delay() or wait() (to delay the execution of a script for a specific amount of time)?
delay()
wait()
Just to expand a little... You can execute code directly in the setTimeout call, but as @patrick says, you normally assign a callback function, like this. The time is milliseconds
setTimeout
setTimeout(func, 4000); function func() { alert('Do stuff here'); }