aboutsummaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js')
-rw-r--r--src/js/even.js6
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
})
}
}