ups
This commit is contained in:
parent
6fce1d3c3d
commit
07bea5d278
|
@ -48,7 +48,7 @@ $('.lightboxPrev').live("click", function(e) {
|
||||||
|
|
||||||
$('.thumbsDetails').live("click", function(e) {
|
$('.thumbsDetails').live("click", function(e) {
|
||||||
// alert($(this).attr("data-bigimage"));
|
// alert($(this).attr("data-bigimage"));
|
||||||
var that = this;
|
var $that = $(this);
|
||||||
var totalImages = $(this).parent().find(".thumbsDetails").length;
|
var totalImages = $(this).parent().find(".thumbsDetails").length;
|
||||||
var thisIndex = $(this).index();
|
var thisIndex = $(this).index();
|
||||||
|
|
||||||
|
@ -63,17 +63,17 @@ $('.thumbsDetails').live("click", function(e) {
|
||||||
var hasPrev = true;
|
var hasPrev = true;
|
||||||
var prevImage = $(this).parent().find(".thumbsDetails").eq(thisIndex - 1);
|
var prevImage = $(this).parent().find(".thumbsDetails").eq(thisIndex - 1);
|
||||||
}
|
}
|
||||||
var $lbox = $('#lightboxContent');
|
var $lbox = $('#lightboxPanel');
|
||||||
var $cont = $('<div />').addClass("lightboxContainer");
|
var $cont = $('<div />').addClass("lightboxContainer");
|
||||||
var bigImage = $(this).attr("data-bigimage");
|
var bigImage = $(this).attr("data-bigimage");
|
||||||
var $img = $('<img />').attr("src", bigImage).addClass("lightboxImg");
|
var $img = $('<img />').attr("src", bigImage).addClass("lightboxImg");
|
||||||
$img.appendTo($cont);
|
$img.appendTo($cont);
|
||||||
var imgWidth = parseInt($img.attr("data-width"));
|
var imgWidth = parseInt($that.attr("data-width"));
|
||||||
var imgHeight = parseInt($img.attr("data-height"));
|
var imgHeight = parseInt($that.attr("data-height"));
|
||||||
var lightboxWidth = imgWidth + 40;
|
var lightboxWidth = imgWidth + 40;
|
||||||
var lightboxHeight = imgHeight + 60;
|
var lightboxHeight = imgHeight + 60;
|
||||||
$('#lightboxPanel').width(lightboxWidth);
|
$lbox.width(lightboxWidth);
|
||||||
$('#lightboxPanel').height(lightboxHeight);
|
$lbox.height(lightboxHeight);
|
||||||
var viewportWidth = $(window).width();
|
var viewportWidth = $(window).width();
|
||||||
var viewportHeight = $(window).height();
|
var viewportHeight = $(window).height();
|
||||||
//FIXME: Add conditionals for if image bigger than viewport
|
//FIXME: Add conditionals for if image bigger than viewport
|
||||||
|
|
Loading…
Reference in New Issue
Block a user