img widths

This commit is contained in:
Sanj 2011-12-14 02:45:40 +05:30
parent 1b804c0189
commit 6fce1d3c3d
2 changed files with 3 additions and 3 deletions

View File

@ -68,8 +68,8 @@ $('.thumbsDetails').live("click", function(e) {
var bigImage = $(this).attr("data-bigimage");
var $img = $('<img />').attr("src", bigImage).addClass("lightboxImg");
$img.appendTo($cont);
var imgWidth = $img.width();
var imgHeight = $img.height();
var imgWidth = parseInt($img.attr("data-width"));
var imgHeight = parseInt($img.attr("data-height"));
var lightboxWidth = imgWidth + 40;
var lightboxHeight = imgHeight + 60;
$('#lightboxPanel').width(lightboxWidth);

View File

@ -111,7 +111,7 @@
{% for i in imagegallery %}
{% thumbnail i.file "600x500" crop="center" as big %}
{% thumbnail i.file "164x114" crop="center" as thumb %}
<img title="{{ i.title }}" src="{{ thumb.url }}" class="thumbsDetails" data-bigimage="{{ big.url }}" />
<img title="{{ i.title }}" src="{{ thumb.url }}" width="164" height="114" data-width="{{ big.width }}" data-height="{{ big.height }}" class="thumbsDetails" data-bigimage="{{ big.url }}" />
<!--
<a href="{{ big.url }}" title="{{i.title}}" class="thickbox" rel="gall">