Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • 1
    Similar question: stackoverflow.com/questions/1141302/… Commented May 29, 2013 at 21:17
  • Implementing a wait(), pause() or sleep() function is a big JS no-no. Whatever you're trying to achieve can likely be done with setTimeout() instead. Commented May 29, 2013 at 21:18
  • What are you trying to achieve? You probably want to delay some code execution? For that see setTimeout and setInterval functions. Commented May 29, 2013 at 21:18
  • What are you trying to do? Maybe setInterval(function(){alert("Hello")},5000); is the solution here. Commented May 29, 2013 at 21:18
  • 1
    XY Problem Commented May 29, 2013 at 21:22