Open tobiasc opened 10 years ago
Not working with your given explanation. However it works like this..
var testAlertifyVar = alertify.log("Will stay until clicked", "", 0);
$('#closeFromApiTest').on('click',function(){
testAlertifyVar.closeNow("show");
})
show parameter is the last part of the classname of an opened notification. (alertify-log-show's show part) This way all of the opened notification closes(Haah, so much more features needed in this project... Owner, where are you??? please come back... :) )
Added function to close notification immediately from anywhere, this is using the className attribute. I created it without changing the code significantly, I tried to only add code.
Here's an example of how to use it:
// display notification that stays forever alertify.log(, , 0);
// close notification from some event handler $('#id').click(function () { alertify.closeNow();
});