Skip to content
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

Styling multiple alerts differently? #143

Open
itsViney opened this issue Jul 10, 2017 · 1 comment
Open

Styling multiple alerts differently? #143

itsViney opened this issue Jul 10, 2017 · 1 comment

Comments

@itsViney
Copy link

Is it possible to add an additional class to the alert when calling alertify? I have a page that calls alertify for two different alerts and I would like to style one differently to the other, but there doesn't appear to be a way to differentiate between the two in CSS. If I had a way to add an additional unique class to each alert I would be able to do this.

@burawi
Copy link

burawi commented Dec 19, 2017

+1
It is easy to make possible. I would suggest to add these lines in line 458 of /src/js/alertify.js:

custom: function(message, class, click) {
  _alertify.log(message, class, click);
  return this;
},

This will give us the possibility to write:

alertify.custom('my message', 'my_class');

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

No branches or pull requests

2 participants