From 44ca21895589e5e7a08abcd2b543b75fafed5de2 Mon Sep 17 00:00:00 2001 From: Maxim Bogdanov Date: Mon, 6 Jul 2015 21:49:23 +0300 Subject: [PATCH] Add ability to add css classes for alerts --- js/bootstrap-notify.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/bootstrap-notify.js b/js/bootstrap-notify.js index e58c6c5..985230a 100644 --- a/js/bootstrap-notify.js +++ b/js/bootstrap-notify.js @@ -37,6 +37,9 @@ else this.$note.addClass('alert-success'); + if(this.options.class) + this.$note.addClass(this.options.class); + if(!this.options.message && this.$element.data("message") !== '') // dom text this.$note.html(this.$element.data("message")); else @@ -86,6 +89,7 @@ type: 'success', closable: true, transition: 'fade', + class: 'alert-dismissible', fadeOut: { enabled: true, delay: 3000