Sweet Alert Syntax

I am failing to get sweet alert going and i think it has something to do with the syntax. Can someone show me what i should be doing

<!DOCTYPE html>
<html>
 <head>
  <title>Testing</title>
  <script src="dist/sweetalert.min.js"></script>
  <link rel="stylesheet" type="text/css" href="dist/sweetalert.css">
 </head>
<body>
<script>
   swal({
     title: 'Confirm',
     text: 'Are you sure to delete this message?',
     type: 'warning',
     showCancelButton: true,
     confirmButtonText: 'Yes, sir',
     cancelButtonText: 'Not at all'
 });
</script>
</body>
</html>


Source: syntax

Leave a Reply