How to clear table data
How to clear table data

Hey everyone. I am attempting to make a javascript function that clears the table but I can not seem to get it to work and no errors are getting outputted.
this is my current javascript function
function clearTable(){
var $table = $('#distributorTable');
$.tablesorter.clearTableBody( $table[0] );
$table.trigger('update');
}
This discussion has been closed.
Answers
This is a forum for the DataTables library. Your code appears to refer to TableSorter, not DataTables.
In DataTables the clear function is simply
clear()
.Allan