What kind of friends do I have this function in jQuery that deletes a record from a dataTable, what I need is that a confirmation be shown when I click on the delete button in the table, so that it appears if you really want to delete it and another cancel button, this is my code:
$(document).on("click", ".btn-delete", function(e){
e.preventDefault();
url = $(this).attr("href");
$.ajax({
url: url,
type: "POST",
success: function(resp){
window.location.href = base_url + resp;
}
});
});