Skip to content

Commit

Permalink
Enable Fancybox image gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjohannchang committed Oct 13, 2015
1 parent d6d011e commit 22bbf17
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 22bbf17

Please sign in to comment.