From d4993687a73c907085d5f04bbd9180d3c41a38c4 Mon Sep 17 00:00:00 2001 From: Thomas Hunziker Date: Fri, 19 Jul 2013 15:22:55 +0200 Subject: [PATCH] Properly declare variables in mediaboxAdv.js The mediaboxAdvanced uses some variables which are not declared properly: container and closeLink. This can cause issues if this are used elsewhere. In my case container is used as an id in my template which caused issues in IE. --- Source/mediaboxAdv.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/mediaboxAdv.js b/Source/mediaboxAdv.js index 821e599..f5dc1b2 100644 --- a/Source/mediaboxAdv.js +++ b/Source/mediaboxAdv.js @@ -27,7 +27,7 @@ var Mediabox; // Global variables, accessible to Mediabox only var options, mediaArray, activeMedia, prevMedia, nextMedia, top, mTop, left, mLeft, winWidth, winHeight, fx, preload, preloadPrev = new Image(), preloadNext = new Image(), // DOM elements - overlay, center, media, bottom, captionSplit, title, caption, number, prevLink, nextLink, + overlay, center, media, bottom, captionSplit, title, caption, number, prevLink, nextLink, container, closeLink, // Mediabox specific vars URL, WH, WHL, elrel, mediaWidth, mediaHeight, mediaType = "none", mediaSplit, mediaId = "mediaBox", margin, marginBottom; @@ -973,4 +973,4 @@ Mediabox.scanPage = function() { }); }; -window.addEvents({domready: Mediabox.scanPage, resize: Mediabox.recenter}); // to recenter the overlay while scrolling, add "scroll: Mediabox.recenter" to the object \ No newline at end of file +window.addEvents({domready: Mediabox.scanPage, resize: Mediabox.recenter}); // to recenter the overlay while scrolling, add "scroll: Mediabox.recenter" to the object