次のコードを機能させようとします
//===== Dialogs =====//
$(".table a.delete").click(function (e) {
e.preventDefault();
bootbox.confirm("Are you sure?", function (confirmed) {
if (confirmed) {
var $el = $(this);
var $tr = $el.closest('tr');
var url = $el.closest('table').data('remove-url');
var id = $tr.data('id');
$tr.fadeOut(function () {
$el.remove();
$.post(url, { id: id }); // do the delete on the server
});
}
});
});
ブートボックスは表示されていますが、以下のコードif(confirmed)
は実行されません。