Skip to content

Commit

Permalink
Merge pull request #416 from changyuheng/pr-fancybox-group
Browse files Browse the repository at this point in the history
Enable Fancybox image gallery
  • Loading branch information
iissnan committed Oct 14, 2015
2 parents e9b40e9 + 22bbf17 commit 9c23b08
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions source/js/fancy-box.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ $(document).ready(function() {
$imageWrapLink = $image.wrap('<a href="' + this.getAttribute('src') + '"></a>').parent('a');
}
$imageWrapLink.addClass('fancybox');
$imageWrapLink.attr('rel', 'group');
if ($image.attr("alt")) {
$imageWrapLink.append('<div class="pic-title"><span>' + $image.attr("alt") + '</span></div>');
$imageWrapLink.attr("title",$image.attr("alt")); //make sure img title tag will show correctly in fancybox
Expand Down

0 comments on commit 9c23b08

Please sign in to comment.