Browse Source

Allow data-title attribute for setting caption.

master
Lokesh Dhakar 6 years ago
parent
commit
c0cc4b748c
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      js/lightbox.js

+ 3
- 3
js/lightbox.js View File

@@ -144,7 +144,7 @@
a = _ref[i];
this.album.push({
link: $(a).attr('href'),
title: $(a).attr('title')
title: $(a).attr('data-title') || $(a).attr('title')
});
if ($(a).attr('href') === $link.attr('href')) {
imageNumber = i;
@@ -155,7 +155,7 @@
// If image is not part of a set
this.album.push({
link: $link.attr('href'),
title: $link.attr('title')
title: $(a).attr('data-title') || $(a).attr('title')
});
} else {
// If image is part of a set
@@ -164,7 +164,7 @@
a = _ref1[i];
this.album.push({
link: $(a).attr('href'),
title: $(a).attr('title')
title: $(a).attr('data-title') || $(a).attr('title')
});
if ($(a).attr('href') === $link.attr('href')) {
imageNumber = i;


Loading…
Cancel
Save