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

@ -32,9 +32,12 @@ $('#listLeft ul li a').live("click", function() {
$('.thumbsDetails').live("click", function(e) {
// alert($(this).attr("data-bigimage"));
var bigImage = $(this).attr("data-bigimage");
var $img = $('<img />').attr("src", bigImage);
var $img = $('<img />').attr("src", bigImage);
$('#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">
{% for img in images %}
{% 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 %}
{% endfor %}
</div>