title: How to destroy a datatable?
body: <p>I'm using <a href="http://www.datatables.net/" rel="noreferrer">datatables</a> and using <a href="https://github.com/dangrossman/bootstrap-daterangepicker" rel="noreferrer">bootstrap-daterangepicker</a> to select a range for which data will be shown in Datatables.</p>
  
  <p>It is working fine.</p>
  
  <p>The problem is when I select a new range in daterangepicker, it provides me with a callback function where I can do my stuff.
  In that callback function, I'm calling Datatables again. But since the table is already being created, how can I destroy the previous table and show a new one in it's place?</p>
  
  <p>Kindly help. I'm stuck. :(</p>
  
  <p>EDIT:
  I've the following code:</p>
  
  <pre><code>$(element).daterangepicker({options},
  function (startDate, endDate) { //This is the callback function that will get called each time
  $('#feedback-datatable').dataTable({
                          "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;",
                          "sPaginationType": "bootstrap",
                          "oLanguage": {
                              "sLengthMenu": "_MENU_ records per page",
                              "oPaginate": {
                                  "sPrevious": "Prev",
                                  "sNext": "Next"
                              }
                          },
                          "aoColumnDefs": [{
                              'bSortable': false,
                              'aTargets': [2,4]
                          }],
                          "bAutoWidth": false,
                          "aoColumns": [
                                        {"sWidth": "20%"},
                                        {"sWidth": "15%"},
                                        {"sWidth": "45%"},
                                        {"sWidth": "15%"},
                                        {"sWidth": "5%"}
                                        ]
                      });
  }
  </code></pre>