swal alter ok then code example
Example 1: sweet alert after click ok redirect
swal({
title: "Wow!",
text: "Message!",
type: "success"
}).then(function() {
window.location = "redirectURL";
});
Example 2: switch alert
swal({
title: "Good job!",
text: "You clicked the button!",
icon: "success",
button: "Aww yiss!"
});