You need to re-factor the code into pieces. This doesn’t stop execution, it just puts a delay in between the parts.
function partA() {
...
window.setTimeout(partB,1000);
}
function partB() {
...
}
More Related Contents:
- JavaScript – Wait for execution
- What is the JavaScript version of sleep()?
- How do I add a delay in a JavaScript loop?
- Sleep in JavaScript – delay between actions
- JavaScript sleep/wait before continuing [duplicate]
- Can any desktop browsers detect when the computer resumes from sleep?
- How to create javascript delay function [duplicate]
- Can I prevent phone from sleep on a webpage
- How to create a sleep/delay in nodejs that is Blocking?
- Can I add javascript within jQuery ready function? [closed]
- Syntax Higlighter For Site [closed]
- Where should I put tags in HTML markup?
- Add a property to a JavaScript object using a variable as the name?
- Sending emails with Javascript
- What is the difference between $(window).load and $(document).ready?
- Sort an array of objects based on another array of ids
- How to update placeholder color using Javascript?
- Way to know if user clicked Cancel on a Javascript onbeforeunload Dialog?
- How do I change the language of moment.js?
- Get and store cookie (from Set-Cookie) from an AJAX POST response
- Cleaner/shorter way to update nested state in Redux?
- How to put rounded corners on a Chart.js Bar chart
- jQuery events .load(), .ready(), .unload()
- Disable Chrome strict MIME type checking
- IE’s document.selection.createRange doesn’t include leading or trailing blank lines
- Facebook OAuth “Unsupported” in Chrome on iOS
- Javascript – Template Strings Don’t Pretty Print Objects
- Javascript function need allow numbers, dot and comma
- HTML form input tag name element array with JavaScript
- Javascript parse error on ‘\u2028’ unicode character