title: DataTables deleting a row without page refresh
body: <p>I am using this code to initialize datatable and after Delete link is clicked - EVERYTHING works OK, but Iam using refresh page, so I tried to delete row directly with DataTable function, but can't get it to work at all.... Here is current code (the one that works, but refreshes whole page):</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function() {
      $('#publishers').dataTable( {
          "iDisplayLength": 50,
      "sPaginationType": "full_numbers",
       "bStateSave": true
  } );
  } );
  
  function DeletePublisher(publisherid) {
  jConfirm('Are you sure you want to delete this publisher?', 'Delete publisher', function(r) { if (r)
  $.ajax({
    type: "GET",
    url: 'includes/publishers/delete-publisher.php?publisherid=' + publisherid,
    data: '',
    success: function(response){
      $.jGrowl('Publisher deleted');
       window.location.reload();
    }
  });
  });
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>and in body...</p>
  
  <pre><code>         ...A LOT OF UNINTERESTING COLUMNS, AND THE ONE WITH ACTION:
  &lt;td class="action-th"&gt;
             &lt;ul class="button-table-head"&gt;
                          &lt;li&gt;&lt;div class="button-head edit-icon"&gt;&lt;a href="#" class="sweet-tooltip" data-text-tooltip="Edit" data-style-tooltip="tooltip-mini-slick"&gt;&lt;span&gt;Edit&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;div class="button-head delete-icon"&gt;&lt;a href="#" class="sweet-tooltip" data-text-tooltip="Delete" data-style-tooltip="tooltip-mini-slick" onclick="DeletePublisher('&lt;?php echo $publisher_id; ?&gt;')"&gt;&lt;span&gt;Delete&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
                      &lt;/ul&gt;
                  &lt;/td&gt;
  </code></pre>
  
  <p>I tried using this code, but it didn't work:</p>
  
  <pre><code>function DeletePublisher(publisherid) {
  jConfirm('Are you sure you want to delete this publisher?', 'Delete publisher',function(r) { if (r)
  $('#publishers tbody').on( 'click', 'tr', function () {
      var tr = this;
  $.ajax({
    type: "POST", //or GET
    url: 'includes/publishers/delete-publisher.php?publisherid=' + publisherid,
    data: '',
    success: function(response){
      t.fnDeleteRow( tr );
      $.jGrowl('Publisher deleted');
  }
  } );
  });
  });
  }
  </code></pre>
  
  <p>Any ideas why- I am totaly noob to JS, JQuery....</p>