The parent color-section get custom classes: noLightbox with-lightbox-caption
the noLightbox class hampers the standard lightbox behavior set by enfold – so every image inside this color-section will now be ruled by the custom lightbox script.
The parent color-section get custom classes: noLightbox with-lightbox-caption
the noLightbox class hampers the standard lightbox behavior set by enfold – so every image inside this color-section will now be ruled by the custom lightbox script.
function animated_enfold_lightbox() {
if(is_page(34087)){
?>
<script type="text/javascript">
(function($){
$(window).on('load', function(){
$('.with-lightbox-caption').magnificPopup({
delegate: 'a',
type: 'image',
removalDelay: 1200,
mainClass: 'avia-popup mfp-3d-unfold', // standard is mfp-zoom-in
midClick: true,
gallery: { enabled:true },
image: {
titleSrc: false,
markup: '<div class="mfp-figure">'+
'<div class="mfp-close"></div>'+
'<div class="mfp-img"></div>'+
'<div class="mfp-bottom-bar">'+
'<div class="mfp-title"></div>'+
'</div>'+
'</div>',
},
callbacks: {
beforeOpen: function() {
this.st.image.markup = this.st.image.markup.replace('mfp-figure', 'mfp-figure mfp-with-anim');
},
markupParse: function (template, values, item) {
if ( item.el.find('.av-image-caption-overlay-center').length ) {
values.title = '<h4 class="heading">' + item.el.find('.av-image-caption-overlay-center').text() + '</h4>';
} else {
values.title = '';
}
},
},
});
});
})(jQuery);
</script>
<?php
}
}
add_action('wp_footer', 'animated_enfold_lightbox', 999);
#top.page-id-34087 .with-lightbox-caption .avia_image {
overflow: visible !important;
}
#top.page-id-34087 .av-image-caption-overlay {
bottom: -30px !important;
font-size: 10px !important;
height: auto !important;
width: 100% !important;
text-align: justify !important;
}
#top.page-id-34087 .avia-image-overlay-wrap:hover .av-image-caption-overlay,
#top.page-id-34087 .avia-image-overlay-wrap:hover .av-caption-image-overlay-bg {
opacity: 1 !important;
}