Topic: How to run a function on Toastr close
dmermigas pro asked 6 years ago
Hi, is it possible to run a jquery function on Toastr close?
Add comment
dmermigas pro answered 6 years ago
Found the anwser:
$("#alert-target").click(function () {
toastr.options = {
"closeButton": false,
"debug": false,
"newestOnTop": true,
"progressBar": true,
"positionClass": "toast-top-center",
"preventDuplicates": false,
"showDuration": 300,
"hideDuration": 1000,
"timeOut": 5000,
"extendedTimeOut": 1000,
"hideEasing": "linear",
"showMethod": "fadeIn",
"hideMethod": "fadeOut"
}
toastr.options.onHidden = function(){ alert('goodbye'); }; //This is what needs to be added!!!
toastr["info"]("Please wait...", "Processing request");
});
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Answered
Specification of the issue
- ForumUser: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.5.9
- Device: PC
- Browser: Firefox, IE Edge
- OS: Win 10
- Provided sample code: No
- Provided link: No