I use toastr to toast notifications in my page. How can I close all open messages if a link is clicked.
check if you have the the toastr
global object defined.
console.log(!!window.toastr);
if you have it you can use toastr.clear();
$('a.myLinkClass').click(function() {
window.toastr.clear();
});