From 0602d8ad1110b41e371d0599056e7ee14ce6ba72 Mon Sep 17 00:00:00 2001 From: Mohammed Buttu Date: Thu, 16 Jun 2011 11:20:27 -0400 Subject: [PATCH] #515 Changed i variable to idx and initialized it --- plugins/flickr/popcorn.flickr.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/flickr/popcorn.flickr.js b/plugins/flickr/popcorn.flickr.js index 8506f13..908e39c 100755 --- a/plugins/flickr/popcorn.flickr.js +++ b/plugins/flickr/popcorn.flickr.js @@ -40,6 +40,9 @@ } ) * */ + + var idx = 0; + Popcorn.plugin( "flickr" , function( options ) { var containerDiv, _userid, @@ -50,17 +53,16 @@ _height = options.height || "50px", _width = options.width || "50px", _padding = options.padding || "5px", - _border = options.border || "0px", - i; + _border = options.border || "0px"; // create a new div this way anything in the target div is left intact // this is later populated with Flickr images containerDiv = document.createElement( "div" ); - containerDiv.id = "flickr"+ i; + containerDiv.id = "flickr" + idx; containerDiv.style.width = "100%"; containerDiv.style.height = "100%"; containerDiv.style.display = "none"; - i++; + idx++; // ensure the target container the user chose exists if ( document.getElementById( options.target ) ) { -- 2.43.0