+ 2
Delay
How can I make a delay in js?
1 Antwort
+ 3
function func() {
/* function body */
}
var delay = 2500; // millisecondes
window.setTimeout( func, delay );
/* rest of code running without waiting execution of 'func' */
If you need to WAIT instead DELAY, you must handle a way to simulate an end event for your function...