Open thiagossnet opened 3 years ago
try : $(".confirm").attr('disabled', 'disabled');
swal({
title: "Are you sure?",
text: "Confirm this",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Confirm!",
cancelButtonText: "Cancel!",
closeOnConfirm: false,
closeOnCancel: true
}, function(){
$(".confirm").attr('disabled', 'disabled');
if (isConfirm) {
$('#execute-form').submit();
}
});
When I click that button repeatedly, it performs the same action repeatedly. Does anyone know a way to disable the confirmation button after the first click?
My code is: