diff --git a/public/javascripts/article.js b/public/javascripts/article.js index 0e5eb2d..a5cc5e8 100644 --- a/public/javascripts/article.js +++ b/public/javascripts/article.js @@ -74,9 +74,9 @@ jQuery(function($) { } } - function zoom_dialog_html(img) { + function zoom_dialog_html(name, img) { // FIXME organize this code better - return '
' + '
' + add_to_text_button('with-text') + '   ' + close_button('with-text') + '
' + return '

'+ name +'

' + '
' + add_to_text_button('with-text') + '   ' + close_button('with-text') + '
' } $('.view-all-images .item').live('click', function(){ @@ -94,9 +94,10 @@ jQuery(function($) { $('a.zoom').live('click', function() { var $item = $(this).closest('.item'); var html_selector = $item.attr('data-item'); + var name = $item.attr('title'); var img = $item.find(html_selector).find('img').attr('src'); $.colorbox({ - html: zoom_dialog_html(img), + html: zoom_dialog_html(name, img), scrolling: false }); return false; -- libgit2 0.21.2