title: jQuery append in loop - DOM does not update until the end
body: <p>When looping over a large collection and appending it to the DOM, the DOM only refreshes after all items have been appended. Why doesn't the DOM update after each <code>append()</code> call? Can I force the DOM to refresh after each append (or maybe after each n number of appends)?</p>
  
  <pre><code>var i = 0;
  for (i=0; i&lt;5000; i++) {
      $('#collection').append('&lt;li&gt;Line Item&lt;/li&gt;');
  }
  </code></pre>
  
  <p><a href="http://jsfiddle.net/FZG7f/" rel="noreferrer">Link to jsfiddle</a></p>
  
  <p>NOTE: I understand that better performance (avoiding DOM reflow) can be achieved by appending all elements to a local variable, and then appending that variable to the DOM. But I want the first n elements to render on the screen, then the next n, etc. until all elements are rendered.</p>