Guest User

Untitled

a guest
Jul 20th, 2016
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function refreshTable(tableId,api){
  2.     $("#"+tableId).DataTable().clear().destroy();
  3.     var table = $("#"+tableId).DataTable({
  4.         serverSide: true,
  5.         ajax:{
  6.             url:api,
  7.             type: "GET"
  8.         }
  9.     });
  10.     table.ajax.reload();
  11.    
  12.     table.on( 'xhr', function () {
  13.         var json = table.ajax.json();
  14.         console.log(json);
  15.     } );
  16. }
Add Comment
Please, Sign In to add comment