Created
September 17, 2015 04:05
-
-
Save ipolevoy/9dc5955d17cd42d805da to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"> | |
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> | |
<script src="//code.jquery.com/jquery-2.1.1.js"></script> | |
<script src="http://lipis.github.io/bootstrap-sweetalert/lib/sweet-alert.js"></script> | |
<link rel="stylesheet" href="http://lipis.github.io/bootstrap-sweetalert/lib/sweet-alert.css"> | |
<button class="sweet-4" >Try It</button> | |
<script type="application/javascript"> | |
document.querySelector('.sweet-4').onclick = function(){ | |
swal({ | |
title: "Are you sure?", | |
text: "You will not be able to recover this imaginary file!", | |
type: "warning", | |
animation : 'slide-from-bottom', | |
showCancelButton: true, | |
confirmButtonClass: 'btn-danger', | |
confirmButtonText: 'Yes, delete it!', | |
closeOnConfirm: false, | |
//closeOnCancel: false | |
}, | |
function(){ | |
swal("Deleted!", "Your imaginary file has been deleted!", "success"); | |
}); | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment