after sweetalert reload page code example
Example 1: location.reload sweetalert
swal({
title: "Good job",
text: "You clicked the button!",
icon: "success",
buttons: [
'NO',
'YES'
],
}).then(function(isConfirm) {
if (isConfirm) {
location.reload();
} else {
//if no clicked => do something else
}
});
Example 2: location.reload sweetalert
swal({title: "Good job", text: "You clicked the button!", type: "success"},
function(){
location.reload();
}
);