Skip to content

Conversation

tobiasc
Copy link

@tobiasc tobiasc commented Aug 1, 2014

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();
});

@Kambaa
Copy link

Kambaa commented Feb 26, 2017

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... :) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants