title: How to output reverse order? AJAX file > DIV
body: <p>AIM: To output the contents of a log file line by line newest at top and oldest at bottom.</p>
  
  <p>CODE: </p>
  
  <pre><code>&lt;script&gt;
  
  $.get('http://192.168.1.1/test.log, function(data)
          {         var lines = data.split("\n");
                     $.each(lines, function(n, elem)
                         {        $('#output').append('&lt;div&gt;' + elem + '&lt;/div&gt;');
                         });
           });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>CURRENT:</p>
  
  <p>This is all working fine and outputing to DIV as expected, however the bottom line is at the bottom of the div and first line at the top. </p>
  
  <p>QUESTION:  How can I change the output to have the last line at the top and first line at bottom?</p>
  
  <p>Thanks in advance.</p>