Photoswipe now allows alternate text for caption

Adding changes from hugo-easy-gallery
f0e6d5d62f58284beadf98db71861af90f2cff8e
This commit is contained in:
Michael Romero 2017-04-02 22:15:03 -07:00
commit 2a110c80e5
2 changed files with 5 additions and 4 deletions

View file

@ -15,9 +15,10 @@ $( document ).ready(function() {
// get properties from child a/img/figcaption elements,
var $figure = $(this),
$a = $figure.find('a'),
$img = $figure.find('img'),
$src = $a.attr('href'),
$title = $figure.find('figcaption').html(),
$msrc = $figure.find('img').attr('src');
$title = $img.attr('alt'),
$msrc = $img.attr('src');
// if data-size on <a> tag is set, read it and create an item
if ($a.data('size')) {
var $size = $a.data('size').split('x');