From 4b2e86145e9225c2721d6ee4e265e31772e3d34a Mon Sep 17 00:00:00 2001 From: Gustavo V Date: Wed, 7 Sep 2016 11:34:19 -0300 Subject: [PATCH] Added possibility to choose the order of insertion. If no order option defined the default will apply: LIFO (prepend) If an order option defined with value 'lifo' then instead of prepending it will append --- dist/notify.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dist/notify.js b/dist/notify.js index 3971640..bf91bf8 100644 --- a/dist/notify.js +++ b/dist/notify.js @@ -360,7 +360,11 @@ anchor.css(css).addClass(pluginClassName + "-corner"); $("body").append(anchor); } - return anchor.prepend(this.wrapper); + if (this.options.order && this.options.order === "fifo") { + return anchor.append(this.wrapper); + } else { + return anchor.prepend(this.wrapper); + } }; Notification.prototype.setElementPosition = function() {