 <p>When you update the div, for instance:</p> <pre><code>$("selector for the div").html("the updated markup"); </code></pre> <p>...the next line of code doesn't run until the div has been updated. At that point, the DOM updates have been completed. Normally that's good enough. If you want to be sure that those updates have been <em>rendered</em> (shown to the user), you can yield back to the browser using <code>setTimeout</code>, like this:</p> <pre><code>// ...do the updates... setTimeout(function() { // They've almost certainly been rendered. }, 0); </code></pre> <p>The delay won't be 0ms, but it'll be very brief. That gives the browser a moment to repaint (if it needs it, which varies by browser).</p>