Top "Settimeout" questions

setTimeout is a global JavaScript method, used to execute a particular function or piece of code after a given delay.

How can I pass a parameter to a setTimeout() callback?

I have some JavaScript code that looks like: function statechangedPostQuestion() { //alert("statechangedPostQuestion"); if (xmlhttp.readyState==4) { var topicId = xmlhttp.responseText; setTimeout("…

javascript parameters callback settimeout
Execute script after specific delay using JavaScript

Is there any JavaScript method similar to the jQuery delay() or wait() (to delay the execution of a script for …

javascript settimeout
Difference between setTimeout with and without quotes and parentheses

I am learning JavaScript and I have learned recently about JavaScript timing events. When I learned about setTimeout at W3…

javascript settimeout
Combination of async function + await + setTimeout

I am trying to use the new async features and I hope solving my problem will help others in the …

javascript async-await settimeout ecmascript-2017
How to make `setInterval` behave more in sync, or how to use `setTimeout` instead?

I am working on a music program that requires multiple JavaScript elements to be in sync with another. I’ve …

javascript settimeout setinterval timing
setTimeout / clearTimeout problems

I try to make a page to go to the startpage after eg. 10sec of inactivity (user not clicking anywhere). …

javascript jquery timer settimeout
Pass correct "this" context to setTimeout callback?

How do I pass context into setTimeout? I want to call this.tip.destroy() if this.options.destroyOnHide after 1000 ms. …

javascript callback this settimeout
setInterval in a React app

I'm still fairly new at React, but I've been grinding along slowly and I've encountered something I'm stuck on. I …

javascript reactjs settimeout state
How do I clear this setInterval inside a function?

Normally, I’d set the interval to a variable and then clear it like var the_int = setInterval(); clearInterval(the_…

javascript settimeout dom-events
setTimeout in React Native

I'm trying to load a splash screen for an iOS app built in React Native. I'm trying to accomplish this …

javascript ios settimeout react-native