From 80b32f9dcbafb32f475de9eabb2f9d30a1aba862 Mon Sep 17 00:00:00 2001 From: MarfHans Date: Fri, 7 Oct 2022 09:51:34 -0800 Subject: [PATCH] Add new 'data-notify="icon"' option 'Content' to replace inside content on element marked with 'data-notify' attr Used for Material icons or similar libraries --- bootstrap-notify.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bootstrap-notify.js b/bootstrap-notify.js index d97e4c0..7e4ac07 100644 --- a/bootstrap-notify.js +++ b/bootstrap-notify.js @@ -206,6 +206,8 @@ setIcon: function () { if (this.settings.icon_type.toLowerCase() === 'class') { this.$ele.find('[data-notify="icon"]').addClass(this.settings.content.icon); + }else if (this.settings.icon_type.toLowerCase() === 'content') { + this.$ele.find('[data-notify="icon"]').text(this.settings.content.icon); } else { if (this.$ele.find('[data-notify="icon"]').is('img')) { this.$ele.find('[data-notify="icon"]').attr('src', this.settings.content.icon);