From f3e9028d5350a1149af5157877a276472932a64f Mon Sep 17 00:00:00 2001 From: Andrew Childs Date: Mon, 24 Apr 2017 16:19:22 -0400 Subject: [PATCH] Only append style tag if it doesn't already exist --- js/theia-sticky-sidebar.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/theia-sticky-sidebar.js b/js/theia-sticky-sidebar.js index 98727d3..d6cb94b 100755 --- a/js/theia-sticky-sidebar.js +++ b/js/theia-sticky-sidebar.js @@ -77,7 +77,10 @@ options.initialized = true; // Add CSS - $('head').append($('')); + var existingStylesheet = $('#theia-sticky-sidebar-stylesheet-' + options.namespace); + if (existingStylesheet.length === 0) { + $('head').append($('')); + } $that.each(function () { var o = {};