test image captions

This commit is contained in:
j 2011-10-11 18:12:00 +05:30
parent c885d2911b
commit d09ac6b0e5
2 changed files with 6 additions and 3 deletions

View File

@ -35,6 +35,9 @@ $('.thumbsDetails').live("click", function(e) {
var $img = $('<img />').attr("src", bigImage); var $img = $('<img />').attr("src", bigImage);
$('#lightbox, #lightboxPanel').fadeIn(400); $('#lightbox, #lightboxPanel').fadeIn(400);
$('#lightboxPanel').empty().append($img); $('#lightboxPanel').empty().append($img);
if ($(this).hasAttr("title")) {
var $caption = $('<div />').addClass("lightboxCaption").text($(this).attr("title")).appendTo($('#lightBoxPanel'));
}
}); });

View File

@ -12,7 +12,7 @@
<div class="thumbsGallery"> <div class="thumbsGallery">
{% for img in images %} {% for img in images %}
{% thumbnail img.image "164x114" crop="center" as im %} {% thumbnail img.image "164x114" crop="center" as im %}
<img src="{{ im.url }}" class="thumbsDetails" data-bigimage="{{ img.image.url }}"/> <img title="{{ img.caption }}" src="{{ im.url }}" class="thumbsDetails" data-bigimage="{{ img.image.url }}"/>
{% endthumbnail %} {% endthumbnail %}
{% endfor %} {% endfor %}
</div> </div>