1 2 3 4 5 6 7 8 9 |
swal({ title: "Wow!", text: "Message!", type: "success" }).then(function() { window.location = "index.php"; }); |
The older way (sweetalert)
CDN: –
1 2 3 4 |
<script type='text/javascript' src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/0.4.2/sweet-alert.min.js"></script> <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/0.4.2/sweet-alert.css"> |
and without using a click!