<div class="container-md">
    <div class="row">   
        <div class="ListInvoices col-12" id="ListInvoices"></div>    
    </div>
</div>
<script>
$(function(){
    loadData();
});

function loadData(){
    $.ajax({
    url: 'pages/list_inv.php',   
    success: function(php_script_response){                
      $('#ListInvoices').html(php_script_response);
      $('.tesla').DataTable();
    }
  });
}
</script>