Don't inject fancybox tag/class to cloudinary class

Incompatible with cloudinary
This commit is contained in:
curben 2018-10-02 12:10:31 +09:30
parent 3f0d87f8aa
commit 9a8a48a15d
1 changed files with 4 additions and 2 deletions

View File

@ -1,8 +1,9 @@
(function ($) {
// Caption
// Fancybox caption
$('.article-entry').each(function (i) {
$(this).find('img').each(function () {
if ($(this).parent().hasClass('fancybox')) return
// Don't insert fancybox element to cloudinary's cld-responsive img class
if ($(this).hasClass('cld-responsive') || $(this).parent().hasClass('fancybox')) return
var alt = this.alt
@ -22,6 +23,7 @@
$('.fancybox').fancybox()
}
//Add "Copy" button to code snippet
var code = document.getElementsByClassName('code');