1jQuery( document ).ready( function($) { 2 if ( $( 'body' ).find( '.dipl_tabs' ).length > 0 ) { 3 $( 'body' ).find( '.dipl_tabs' ).each( function() { 4 dipl_init_tabs_module( $( this ) ); 5 } ); 6 } 7 8 $( document ).ajaxSuccess( function() { 9 if ( $('body').find('.dipl_tabs').length > 0 ) { 10 $('body').find('.dipl_tabs').each(function(){ 11 if ( 'click' === $(this).find('.dipl_tab_wrapper').attr('data-trigger') ) { 12 $(this).find('.dipl_tab_wrapper .dipl_tabs_item_title').each( function() { 13 let $elem = '.' + $(this).prop('class').match(/(dipl_tabs_item\_[^\s]*)/)[0]; 14 $('body').on( 'click', $elem, function() { 15 if ( $(this).hasClass('dipl_active_tab') ) { 16 return false; 17 } 18 var element = parseInt($(this).index()) + 1; 19 $(this).addClass('dipl_active_tab').siblings().removeClass('dipl_active_tab'); 20 $(this).parent().siblings('.dipl_tabs_content').find('.dipl_tabs_item:nth-child('+ element + ')').addClass('dipl_active_tab_content').siblings().removeClass('dipl_active_tab_content'); 21 dipl_tabs_reinit_modules( $(this) ); 22 } ); 23 } ); 24 } else { 25 $(this).find('.dipl_tab_wrapper .dipl_tabs_item_title').each( function() { 26 let $elem = '.' + $(this).prop('class').match(/(dipl_tabs_item\_[^\s]*)/)[0]; 27 $('body').on('mouseenter', $elem, function(e) { 28 var element = parseInt($(this).index()) + 1; 29 if ( $(this).hasClass('dipl_active_tab') ) { 30 return false; 31 } 32 $(this).addClass('dipl_active_tab').siblings().removeClass('dipl_active_tab'); 33 $(this).parent().siblings('.dipl_tabs_content').find('.dipl_tabs_item:nth-child('+ element + ')').addClass('dipl_active_tab_content').siblings().removeClass('dipl_active_tab_content'); 34 dipl_tabs_reinit_modules( $(this) ); 35 } ); 36 } ); 37 } 38 } ); 39 } 40 } ); 41} ); 42 43// Init tabs module function. 44function dipl_init_tabs_module( wrapObj ) { 45 wrapObj.find( '.dipl_tabs_item_title:first-child' ).addClass( 'dipl_active_tab' ); 46 wrapObj.find( '.dipl_tabs_item:first-child' ).addClass( 'dipl_active_tab_content' ); 47 if ( 'click' === wrapObj.find('.dipl_tab_wrapper').attr( 'data-trigger' ) ) { 48 wrapObj.find('.dipl_tab_wrapper .dipl_tabs_item_title').on( 'click', function() { 49 var $this = jQuery( this ); 50 if ( $this.hasClass('dipl_active_tab') ) { 51 return false; 52 } 53 var element = parseInt( $this.index() ) + 1; 54 $this.addClass('dipl_active_tab').siblings().removeClass('dipl_active_tab'); 55 wrapObj.find('.dipl_tabs_content').find('.dipl_tabs_item:nth-child('+ element + ')').addClass('dipl_active_tab_content').siblings().removeClass('dipl_active_tab_content'); 56 dipl_tabs_reinit_modules( $this ); 57 } ); 58 } else { 59 wrapObj.find( '.dipl_tab_wrapper .dipl_tabs_item_title' ).on( 'mouseenter', function(e) { 60 var $this = jQuery( this ); 61 if ( $this.hasClass('dipl_active_tab') ) { 62 return false; 63 } 64 var element = parseInt( $this.index() ) + 1; 65 $this.addClass('dipl_active_tab').siblings().removeClass('dipl_active_tab'); 66 wrapObj.find('.dipl_tabs_content').find('.dipl_tabs_item:nth-child('+ element + ')').addClass('dipl_active_tab_content').siblings().removeClass('dipl_active_tab_content'); 67 dipl_tabs_reinit_modules( $this ); 68 } ); 69 } 70} 71 72function dipl_tabs_reinit_modules( el ) { 73 if ( el.parents('.dipl_tabs').find('.et_pb_gallery').length > 0 ) { 74 el.parents('.dipl_tabs').find('.et_pb_gallery').each( function() { 75 window.et_pb_gallery_init( jQuery(this) ); 76 } ); 77 } 78 if ( el.parents('.dipl_tabs').find('.dipl_masonry_gallery').length > 0 ) { 79 el.parents('.dipl_tabs').find('.dipl_masonry_gallery').each( function() { 80 let $this = jQuery(this).find('.dipl_masonry_gallery_wrapper'); 81 dipl_tabs_initiate_isotope( $this, '.dipl_masonry_gallery_item', '.dipl_masonry_gallery_item', '.dipl_masonry_gallery_item_gutter', true ); 82 } ); 83 } 84 if ( el.parents('.dipl_tabs').find('.el_masonry_gallery').length > 0 ) { 85 el.parents('.dipl_tabs').find('.el_masonry_gallery').each( function() { 86 let $this = jQuery(this).find('.el_masonry_gallery_wrapper'); 87 dipl_tabs_initiate_isotope( $this, '.el_masonry_gallery_item', '.el_masonry_gallery_item', '.el_masonry_gallery_item_gutter', true ); 88 } ); 89 } 90 if ( el.parents('.dipl_tabs').find('.el_dynamic_masonry_gallery').length > 0 ) { 91 el.parents('.dipl_tabs').find('.el_dynamic_masonry_gallery').each( function() {
92 let $this = jQuery(this).find('.el_masonry_gallery_wrapper'); 93 dipl_tabs_initiate_isotope( $this, '.el_masonry_gallery_item', '.el_masonry_gallery_item', '.el_masonry_gallery_item_gutter', true ); 94 } ); 95 } 96 if ( el.parents('.dipl_tabs').find('.dipl_woo_products_category_isotope_container').length > 0 ) { 97 el.parents('.dipl_tabs').find('.dipl_woo_products_category_isotope_container').each( function() { 98 dipl_tabs_initiate_isotope( jQuery(this), '.dipl_woo_products_category_isotope_item', '.dipl_woo_products_category_isotope_item', '.dipl_woo_products_category_isotope_item_gutter', true ); 99 } ); 100 } 101 if ( el.parents('.dipl_tabs').find('.dipl_woo_products_isotope_container').length > 0 ) { 102 el.parents('.dipl_tabs').find('.dipl_woo_products_isotope_container').each( function() { 103 dipl_tabs_initiate_isotope( jQuery(this), '.dipl_woo_products_isotope_item', '.dipl_woo_products_isotope_item', '.dipl_woo_products_isotope_item_gutter', true ); 104 } ); 105 } 106 if ( el.parents('.dipl_tabs').find('.dipl_testimonial_isotope_container').length > 0 ) { 107 dipl_tabs_initiate_isotope( el.parents('.dipl_tabs').find('.dipl_testimonial_isotope_container'), '.dipl_testimonial_isotope_item' ); 108 } 109 if ( el.parents('.dipl_tabs').find('.dipl_faq_masonry_container').length > 0 ) { 110 dipl_tabs_initiate_isotope( el.parents('.dipl_tabs').find('.dipl_faq_masonry_container'), '.dipl_faq_page_schema_item' ); 111 } 112 if ( typeof et_animate_element === 'function' ) { 113 el.parents( '.dipl_tabs' ).find( '.dipl_active_tab_content .et_animated' ).each( function() { 114 et_animate_element( $( this ) ); 115 } ); 116 } 117} 118 119function dipl_tabs_initiate_isotope( $container = '', $itemSelector = '', $columnWidth = '', $gutter = '', $imagesLoaded = false ) { 120 if ( '' === $container || '' === $itemSelector ) { 121 return ''; 122 } 123 124 let $masonry = {}; 125 if ( '' !== $columnWidth && '' !== $gutter ) { 126 $masonry = { 127 columnWidth: $columnWidth, 128 gutter: $gutter 129 } 130 } 131 132 // options. 133 let $isotope = $container.isotope( { 134 itemSelector: $itemSelector, 135 layoutMode: 'masonry', 136 percentPosition: true, 137 resize: true, 138 masonry: $masonry 139 } ); 140 141 $isotope.isotope( 'revealItemElements', $container.find($itemSelector) ) 142 if ( $imagesLoaded ) { 143 $isotope.imagesLoaded().progress( function() { 144 $isotope.isotope( 'layout' ); 145 $isotope.isotope( 'reloadItems' ); 146 } ); 147 } 148}
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.