Swal ok trigger event code example
Example 1: sweet alert after click ok redirect
swal({
title: "Wow!",
text: "Message!",
type: "success"
}).then(function() {
window.location = "redirectURL";
});
Example 2: sweetalert close on custom button click
swal.close()