I'm using sweet alert, but i want make it close automatically if the request of ajax is completed
swal({
title: "Are you sure?",
text: "You are choosing order by custom search",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Confirm",
closeOnConfirm: false,
timer: **AUTO WITH AJAX??**
},
I am adding a variable
var dones = $(document).ajaxComplete(function(){
swal.close()
});
and make swal like this
swal({
title: "Are you sure?",
text: "You are choosing order by custom search",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Confirm",
**timer: dones,**
closeOnConfirm: false
},
but still not like I expected