Created
July 3, 2018 06:55
-
-
Save yasaryousuf/ca7090ba907c724a9f129873d27cd94d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
$('.unlink-user').on('click', function(e){ | |
var href = $(this).attr('href'); | |
e.preventDefault(); // <--- prevent form from submitting | |
swal({ | |
title: "Are you sure?", | |
text: "You will not be able to recover this imaginary file!", | |
icon: "warning", | |
buttons: [ | |
'No, cancel it!', | |
'Yes, I am sure!' | |
], | |
dangerMode: true, | |
}).then(function(isConfirm) { | |
if (isConfirm) { | |
window.location.href = href; | |
} else { | |
return false; | |
} | |
}) | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment