title: How can I update the DOM after Ajax Call (jQuery)?
body: <p>How can I update the DOM with new record added element after call?</p>
  
  <p>Should I return the newly inserted db record contents on call back then append using jquery?</p>
  
  <p>Please advice if not enough data to answer question.</p>
  
  <pre><code>$(function(){
  
          $('#postentry').submit(function() {
            var tyu = $('#tittle_ent').val();
            if(tyu.length &lt;= 2)
              {alert('Enter More Text!'); return false;}else
              {
                  $.post(  
                   "posts_in.php",  
                   $("#postentry").serialize(),  
                      function(data){  
                          //alert(data); 
                      }  
                  );  
                  return false;
              }
          });
  
      });
  </code></pre>
  
  <p>Each record look like this:</p>
  
  <pre><code>&lt;div id="post349" class="myclass"&gt;
  This is some text.    
  &lt;/div&gt;
  </code></pre>