Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript sleep one second

for (var j = 0; j < 50; j++) {
  setTimeout(function() {
     $('body').append('<iframe src="http://www.example.com"></iframe>');
  }, j * 1000);  // each call is scheduled to run after j seconds
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #sleep
ADD COMMENT
Topic
Name
1+5 =