I use sweet alert like
HelloHow can I trigger a function after confirm or cancel
1 reply · opened Sep 28, 2016
I use sweet alert like
HelloHow can I trigger a function after confirm or cancel
Hello,
We Really Apologize but we currently do not provide Support for 3rd-Party Plugins according to the Support Policy: https://themeforest.net/page/item_support_policy . But what we found on the SweetAlert Plugin Documentation: https://limonte.github.io/sweetalert2/ , you will need to use the following code for your Usage Scenario:
swal({
title: 'Are you sure?',
text: "You won't be able to revert this!",
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes, delete it!',
cancelButtonText: 'No, cancel!',
confirmButtonClass: 'btn btn-success',
cancelButtonClass: 'btn btn-danger',
buttonsStyling: false
}).then(function() {
swal(
'Deleted!',
'Your file has been deleted.',
'success'
);
}, function(dismiss) {
// dismiss can be 'cancel', 'overlay',
// 'close', and 'timer'
if (dismiss === 'cancel') {
swal(
'Cancelled',
'Your imaginary file is safe :)',
'error'
);
}
})Hope this Helps! Thanks for your Patience.
Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.
Have the same question, or something new?
Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.
Reply on the dashboard