From 07bea5d27817ef544221c641a7b4ff1d4cc671cc Mon Sep 17 00:00:00 2001 From: Sanj Date: Wed, 14 Dec 2011 02:53:46 +0530 Subject: [PATCH] ups --- itf/static/js/insidepage.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/itf/static/js/insidepage.js b/itf/static/js/insidepage.js index 61cad51..d4a50f2 100755 --- a/itf/static/js/insidepage.js +++ b/itf/static/js/insidepage.js @@ -48,7 +48,7 @@ $('.lightboxPrev').live("click", function(e) { $('.thumbsDetails').live("click", function(e) { // alert($(this).attr("data-bigimage")); - var that = this; + var $that = $(this); var totalImages = $(this).parent().find(".thumbsDetails").length; var thisIndex = $(this).index(); @@ -63,17 +63,17 @@ $('.thumbsDetails').live("click", function(e) { var hasPrev = true; var prevImage = $(this).parent().find(".thumbsDetails").eq(thisIndex - 1); } - var $lbox = $('#lightboxContent'); + var $lbox = $('#lightboxPanel'); var $cont = $('
').addClass("lightboxContainer"); var bigImage = $(this).attr("data-bigimage"); var $img = $('').attr("src", bigImage).addClass("lightboxImg"); $img.appendTo($cont); - var imgWidth = parseInt($img.attr("data-width")); - var imgHeight = parseInt($img.attr("data-height")); + var imgWidth = parseInt($that.attr("data-width")); + var imgHeight = parseInt($that.attr("data-height")); var lightboxWidth = imgWidth + 40; var lightboxHeight = imgHeight + 60; - $('#lightboxPanel').width(lightboxWidth); - $('#lightboxPanel').height(lightboxHeight); + $lbox.width(lightboxWidth); + $lbox.height(lightboxHeight); var viewportWidth = $(window).width(); var viewportHeight = $(window).height(); //FIXME: Add conditionals for if image bigger than viewport