I thought this would be rather simple but it seems the empty method is not working to clear out a tbody that I have. I would appreciate if anyone knows a proper way to do this,
you can use the remove() function of the example below and build table again with table head, and table body
remove()
$("#table_id thead").remove(); $("#table_id tbody").remove();