1jQuery(document).ready( function($) { 2 3 if ( $('body').find('.dipl_image_card').length > 0 ) { 4 $('body').find('.dipl_image_card').each( function() { 5 6 let thisObj = $( this ), 7 wrapObj = thisObj.find( '.dipl_image_card_wrapper' ); 8 9 if ( 'on' === wrapObj.data( 'enable_lightbox' ) ) { 10 let $orderClass = thisObj.prop('class').match(/(dipl_image_card\_[^\s]*)/)[0] + '_lightbox', 11 $effect = wrapObj.data('lightbox_effect'), 12 $zoom = 'zoom' === $effect ? true : false, 13 $duration = 'none' !== $effect ? parseInt( wrapObj.data('lightbox_transition_duration') ) : 0, 14 $mainClass = 'mfp-img-mobile dipl_image_card_lightbox ' + $orderClass + ' dipl_mfp_' + $effect, 15 $prependTo = $('body'); 16 17 if ( $('body').hasClass('et-tb-has-template') ) { 18 if ( $orderClass.includes('_tb_header') ) { 19 $prependTo = $('body').find('#page-container').find('#et-boc .et-l--header'); 20 } else if ( $orderClass.includes('_tb_body') ) { 21 $prependTo = $('body').find('#page-container').find('#et-boc .et-l--body'); 22 } else if ( $orderClass.includes('_tb_footer') ) { 23 $prependTo = $('body').find('#page-container').find('#et-boc .et-l--footer'); 24 } 25 } 26 27 wrapObj.magnificPopup( { 28 delegate: '.dipl_image_card_image', 29 type: 'image', 30 prependTo: $prependTo, 31 closeOnContentClick: false, 32 removalDelay: $duration, 33 closeBtnInside: false, 34 mainClass: $mainClass, 35 callbacks: { 36 elementParse: function(item) { 37 item.src = item.el.attr('src'); 38 } 39 }, 40 gallery: { enabled: false }, 41 zoom: { 42 enabled: $zoom, 43 duration: $duration, 44 easing: 'ease-in-out', 45 }, 46 image: { 47 markup: '<div class="mfp-figure">'+ 48 '<div class="mfp-close"></div>'+ 49 '<div class="mfp-img"></div>'+ 50 '</div>', 51 tError: '<a href="%url%">The image</a> could not be loaded.', 52 }, 53 allowHTMLInTemplate: true 54 } ); 55 } 56 } ); 57 }; 58} ); // Document.ready.
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.