Skip to content

Commit

Permalink
add data-caption on thumbnails
Browse files Browse the repository at this point in the history
  • Loading branch information
mdz0r authored Dec 2, 2019
1 parent 325e9cd commit 0d3ca29
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions assets/javascripts/lightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ $(document).ready(function() {
// add rel attribute to thumbnails of the same journal entry
$("div.journal div.thumbnails a").each(function(i, obj) {
var relgroup = 'thumbnails-' + $(this).closest('div.journal').attr('id')
var title = $(this).attr('title');
$(this)
.attr('rel', relgroup)
.attr('data-fancybox', relgroup)
.attr('data-caption', title);
});


Expand Down

0 comments on commit 0d3ca29

Please sign in to comment.