DataTables on an ajax response -


i'm using datatable.net script on site , have standard loaded table , works expected.

i have additional query filters use re-load table.

something this

$.get(ajaxurl, save_scope, function(response) {         table.html(response);         table.datatable();     }); 

the response loads correctly, datatable() function doesn't seem work @ on newly loaded table. there type of argument need pass causes datatable script re-apply on page?

what error receiving?

datatable() cannot applied 2 times same table. 1 possible solution first remove table:

   //delete datable object first    table.fndestroy();     //reload table content    table.html(response);     //create table object    table.datatable(); 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -