From ed5809e3f447f2de7e7e1f4a99b6c0c1a5d81c21 Mon Sep 17 00:00:00 2001 From: Michael Seid Date: Mon, 24 Jun 2013 13:56:17 -0400 Subject: [PATCH] Fixed the anonymous function. --- prismbutton.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/prismbutton.js b/prismbutton.js index f4f7855..7afdaa7 100644 --- a/prismbutton.js +++ b/prismbutton.js @@ -1,5 +1,3 @@ -(function(){ -//Lets set the name space so that we don't overwrite global functions on other peoples web page. var PrismButton = {} // SHOW POP-OVER PrismButton.showPopOver = function(divID) { @@ -19,6 +17,10 @@ PrismButton.closePopOver = function(divID) { document.getElementById(divID).style.display = "none"; } +;(function( document ){ +//Lets set the name space so that we don't overwrite global functions on other peoples web page. + + var prism = document.createElement("div"); prism.setAttribute("id", "prismbutton"); prism.innerHTML = ""; @@ -44,4 +46,4 @@ PrismButton.closePopOver = function(divID) { link.media = 'all'; head.appendChild(link); } -})(); +})(document);