title: How To Reinitialize Datatable in Ajax
body: <p>What I Need </p>
  
  <p>*When Ajax is loaded datable is reintailized.</p>
  
  <ul>
  <li><p>i would explain in steps</p>
  
  <ol>
  <li>Here is the output of first step :<a href="http://postimg.org/image/c6p8jwp3b/" rel="noreferrer">http://postimg.org/image/c6p8jwp3b/</a>.</li>
  <li>Here is the output of second step :<a href="http://postimg.org/image/6fm1z253h/" rel="noreferrer">http://postimg.org/image/6fm1z253h/</a></li>
  <li>Here is the output of third step:<a href="http://postimg.org/image/5btny60xf/" rel="noreferrer">http://postimg.org/image/5btny60xf/</a>.</li>
  </ol></li>
  <li><p>No Reinitialize Of datatable.</p></li>
  <li><p>I just want paging and search should be reintialized.</p></li>
  <li><p>i have taken help from this url: <a href="http://datatables.net/forums/discussion/256/fnreloadajax/p1" rel="noreferrer">http://datatables.net/forums/discussion/256/fnreloadajax/p1</a>.</p></li>
  </ul>
  
  <p>Ajax call code:</p>
  
  <pre><code>   if ($('#teamTable').size() &gt; 0)
      {
  
          $('#teamTable').dataTable({
              "sPaginationType": "bootstrap"
          });
      }
  
        $("#save_team").click(function() {
              $.ajax({
              type: "POST",
              url: "asana_team.php",
              data: { people_name: $('#e2').val(), team_name:$('#teamname').val() },
              beforeSend : function(){
                  $("#team_table").remove();
                  $("#team_table_div").append("&lt;center id=\"loading\" style=\"margin-top:25%;margin-bottom:25%\"&gt;&lt;img src='../common/images/ajax-loader.gif' /&gt;&lt;/center&gt;");
              },
              contentType: "application/x-www-form-urlencoded"
              }).done(function(data) {
                  $("#loading").remove();
                  $('#team_table_div').append(data);
                  $('#teamTable').dataTable({
                      "sPaginationType": "bootstrap"
                  });                    
              });
          });
  </code></pre>
  
  <p>* working fine  but i reintializing pagination in datatable no datable is loaded.</p>
  
  <ul>
  <li><p>i have used this code  to reinitailize table.</p>
  
  <pre><code> function callBack()
   {
   var call= $('#teamTable');
  
  call.dataTable({
   "sPaginationType": "bootstrap",
   "sDom": "&lt;'row-fluid'&lt;'span6'l&gt;&lt;'span6'f&gt;r&gt;t&lt;'row-fluid'&lt;'span6'i&gt;&lt;'span6'p&gt;&gt;",
   "oLanguage": {
   "sLengthMenu": "_MENU_ records per page"
   } });
  }
  $(document).ready(function() {
  callBack();
  });
  </code></pre></li>
  </ul>