diff options
author | olOwOlo <26087907+olOwOlo@users.noreply.github.com> | 2017-09-06 17:20:16 +0800 |
---|---|---|
committer | olOwOlo <26087907+olOwOlo@users.noreply.github.com> | 2017-09-06 17:20:16 +0800 |
commit | 8137021405dffb6505881eb0d469fce1b1725617 (patch) | |
tree | 3d932b666ea3b193a3d912184e0da72dc18c14d1 /src | |
parent | 6a66b73a437ff4f5e450da2cf15a92e502bcd44a (diff) |
feat: group images with fancybox
Diffstat (limited to 'src')
-rw-r--r-- | src/js/even.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/js/even.js b/src/js/even.js index 5538661..6aef540 100644 --- a/src/js/even.js +++ b/src/js/even.js @@ -114,13 +114,13 @@ Even.fancybox = function () { if ($.fancybox) { $('.post').each(function () { $(this).find('img').each(function () { - $(this).wrap('<a class="fancybox" href="' + this.src + '" title="' + this.alt + '"></a>') + $(this).wrap(`<a class="fancybox" href="${this.src}" data-fancybox="gallery" data-caption="${this.title}"></a>`) }) }) $('.fancybox').fancybox({ - openEffect: 'elastic', - closeEffect: 'elastic' + selector: '.fancybox', + protect: true }) } } |