removes unnecessary condition

This commit is contained in:
buttle 2021-10-14 14:31:18 +02:00
parent 16c745ce4c
commit 5fb1286a1d
1 changed files with 1 additions and 4 deletions

View File

@ -63,10 +63,7 @@ jQuery(document).ready(function() {
var image = images_<?= $gallery_id ?>[i] var image = images_<?= $gallery_id ?>[i]
var src_link = '<div class="sg_src_link"><a href="'+image['item_url']+'">Source</a></div>'; var src_link = '<div class="sg_src_link"><a href="'+image['item_url']+'">Source</a></div>';
var gallery_image = $('#<?= $gallery_id ?>_wrap').find('img[src="'+image['media_url']+'"]') var gallery_image = $('#<?= $gallery_id ?>_wrap').find('img[src="'+image['media_url']+'"]')
if ( !($(gallery_image).next().attr('src') == image['media_url']) ){
$(gallery_image).closest('.brick').append(src_link) $(gallery_image).closest('.brick').append(src_link)
console.log(image['media_url'])
}
} }
<?php } ?> <?php } ?>
}); });