title: What is the best way to append data from AJAX?
body: <p>At the moment i am using <code>JSON</code> as a result of <code>AJAX</code> and dynamically create all new DOM elements which i need. But here I was thinking - is it right? For example if i need to create a <code>&lt;table&gt;</code> of data is is better to build it with JS or generate it on the server and just append result to the page?</p>
  
  <p><strong>UPDATE</strong>
  Now i do like this:</p>
  
  <pre><code>jQuery.getJSON(url, function(result){var table = jQuery('&lt;table/&gt;').append([jQuery('&lt;td/&gt;.....
  </code></pre>
  
  <p>But also can simply like this:</p>
  
  <pre><code>jQuery.get(URL, function(result){jQuery('body').append(result);}.......
  </code></pre>