Skip to content

Added function to close notification immediately from anywhere #239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: 0.3
Choose a base branch
from
Open

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