I'm using data table master with bootstrap.(https://www.datatables.net/manual/styling/bootstrap). When I delete data, i need to refresh that table. But it doesn't work. Only one time it could refresh. Then I have to reload that page. Please help me, and suggest me a good data table for bootstrap. My code is
$("form").on('submit',(function(e) {
e.preventDefault();
var id_value= <?php echo $id ?>
$.post('actions/driver/driver-delete.php',{id:id_value},function(data)
{
if(data)
{
$("table").load(location.href + ' table');
$('#myModal').modal('hide');
}
})
data-table code
<script>
$(document).ready(function() {
$('#driver-list').dataTable();
} );
</script>