1jQuery(document).ready(function($){ 2 3 xxlpix_app_main.wrapInputs(); 4 xxlpix_app_main.wrapSelects(); 5 xxlpix_app_main.updateShippingTime(); 6 7 $('.promotion-header .btn').on('click', function(){ 8 jQuery.fancybox.open({ 9 src: app_data.assets_url+'/js/templates/promo.php', 10 type: 'ajax', 11 touch: false, 12 }); 13 }); 14 15 $('.site-navi .js-close, .site-navi .js-menu').on('click', function(){ 16 ToggleSiteNavi(); 17 }); 18 19 $('.site-navi .icon-angle-down').on('click', function(){ 20 $(this).siblings('.sub-menu-wrap').toggleClass('active'); 21 }); 22 23 $('.meta-nav .search-field').on({ 24 focus: function(){ 25 $(this).parents('.header-site').addClass('search-focus'); 26 }, 27 blur: function(){ 28 $(this).parents('.header-site').removeClass('search-focus'); 29 } 30 }); 31 32 $('.site-navi .menu-cart').on('click', function(){ 33 jQuery().xxlPopup({ 34 url: app_data.assets_url+'js/templates/_loader.php?file=cart', 35 callback: function(){ 36 ToggleSiteNavi(); 37 } 38 }); 39 }); 40 $('.site-navi .menu-liked').on('click', function(){ 41 jQuery().xxlPopup({ 42 url: app_data.assets_url+'js/templates/_loader.php?file=liked', 43 callback: function(){ 44 ToggleSiteNavi(); 45 } 46 }); 47 //window.location.href = '/de/merkliste/'; 48 }); 49 50 if (typeof Cookies.get('ip_country') == 'undefined') { 51 jQuery.ajax({ 52 type: 'POST', 53 url: app_data.functions_url+'?func=setCountryByIp', 54 async: false, 55 }); 56 } 57 58 // jelly button 59 $('.btn-jelly').on('click', function() { 60 var el = $(this); 61 var duration = 0.3; 62 var delay = 0.08; 63 64 gsap.to(el, {duration: duration, scaleY: 1.6, ease: Expo.easeOut}); 65 gsap.to(el, {duration: duration, scaleX: 1.2, scaleY: 1, ease: Back.easeOut, easeParams: [3], delay: delay}); 66 gsap.to(el, {duration: duration*1.25, scaleX: 1, scaleY: 1, ease: Back.easeOut, easeParams: [6], delay: delay * 3 }); 67 }); 68 69 70 // up-down button 71 $('body').on('click', '.btn-up-down', function() { 72 var el = $(this); 73 el.addClass('ani-up-down'); 74 setTimeout(function(){ 75 el.removeClass('ani-up-down'); 76 }, 300); 77 }); 78 79 // load lotties 80 jQuery.initialize('.btn-lottie', function(e) { 81 //$('.btn-lottie').each(function(){ 82 var el = $(this); 83 var lottie_src = el.attr('data-lottie'); 84 var style = ''; 85 if (lottie_src == 'confetti.json') { 86 style = 'top: -200%; left: auto;'; 87 } 88 el.wrap('<div class="lottie-wrap">'); 89 el.after('<div class="lottie" style="'+style+'"></div>'); 90 var temp = lottie.loadAnimation({ 91 container: el.siblings('.lottie')[0], 92 renderer: 'svg', 93 loop: false, 94 autoplay: false, 95 path: '/wp-content/plugins/xxlpix-app-config/includes/assets/images/lotties/'+lottie_src 96 }); 97 98 el.click(function(){ 99 temp.stop(0); 100 temp.setSpeed(2); 101 temp.play(0); 102 }); 103 }); 104 105}); 106 107function ToggleSiteNavi() { 108 //jQuery('.site-navi').slideToggle('fast'); 109 jQuery('.site-navi').toggleClass('active'); 110 jQuery('body').toggleClass('no-scroll'); 111} 112 113(function(jQuery) { 114 var methods = { 115 init: function(options) { 116 var params = jQuery.extend({ 117 url: '', 118 loading: false, 119 text: '', 120 data: null, 121 callback: null, 122 close_btn: true, 123 }, options); 124 125 var loading_class = ''; 126 if (params.loading) { 127 var loading_class = 'loading'; 128 toggleLoadingNew('fixed', 1); 129 } 130 if (params.close_btn) { 131 var render = '<div class="xxl-overlay '+loading_class+'"><div class="js-xxloverlay-close">Ã</div><div class="wrap"></div></div>'; 132 } else { 133 var render = '<div class="xxl-overlay '+loading_class+'"><div class="wrap"></div></div>'; 134 } 135 jQuery('body').css('overflow-y', 'hidden').prepend(render); 136 jQuery('.xxl-overlay .wrap').load(params.url, params.data, params.callback); 137 jQuery('.xxl-overlay').on('click', '.js-xxloverlay-close', function(){ 138 jQuery('body').css('overflow-y', 'inherit'); 139 jQuery('.xxl-overlay').remove(); 140 }); 141 }, 142 close: function() { 143 jQuery('body').css('overflow-y', 'inherit'); 144 jQuery('.xxl-overlay').remove(); 145 }, 146 update : function( content ) { }// !!! 147 }; 148 jQuery.fn.xxlOverlay = function(params) { 149 if ( methods[params] ) { 150 return methods[ params ].apply( this, Array.prototype.slice.call( arguments, 1 ));
151 } else if ( typeof params === 'object' || ! params ) { 152 return methods.init.apply( this, arguments ); 153 } else { 154 jQuery.error( 'Method ' + methodOrOptions + ' does not exist' ); 155 } 156 }; 157}(jQuery)); 158 159/////////////////////// 160 161function Plugin_Main_Functions() { 162 var intern = this; 163 164 this.wrapSelects = function() { 165 jQuery('select:not(.special, .select2)').each(function(){ 166 if (!jQuery(this).parent().is('.select-wrap')) { 167 var style = jQuery(this).attr('style'); 168 if (typeof style == 'undefined') { 169 style = ''; 170 } else { 171 jQuery(this).attr('style', ''); 172 style = 'style="'+style+'"'; 173 } 174 jQuery(this).wrap('<span class="select-wrap" '+style+'></span>').after('<span class="focus"></span>'); 175 jQuery(this).on('change', function(){ 176 jQuery(this).blur(); 177 }); 178 } 179 }); 180 jQuery('select.special').each(function(){ 181 var el = jQuery(this); 182 var autoWidth = true; 183 if (el.hasClass('full-width')) { 184 var autoWidth = false; 185 } 186 el.selectBoxIt({ 187 downArrowIcon: 'icon icon-angle-down', 188 hideEffectSpeed: 400, 189 autoWidth: autoWidth, 190 copyClasses: 'container' 191 }); 192 // fix broken selected format 193 el.on('changed', function(){ 194 if (typeof el.find('option:selected').attr('data-text') !== 'undefined') { 195 var new_html = el.find('option:selected').attr('data-text').replaceAll("'", '"'); 196 el.next('.selectboxit-container').find('.selectboxit-text').html(new_html); 197 } 198 }); 199 }); 200 } 201 202 this.wrapInputs = function() { 203 jQuery('input[type="radio"], input[type="checkbox"]').each(function(){ 204 if(!jQuery(this).parent().is('.input-box')) { 205 jQuery(this).wrap('<span class="input-box"></span>').after('<span class="box"></span>'); 206 } 207 }); 208 } 209 210 this.updateShippingTime = function() { 211 if (jQuery('.js-delivery-date').length) { 212 if (app_data.berlin_time > 12) { 213 jQuery.ajax({ 214 type: 'POST', 215 url: app_data.functions_url+'?func=getShippingDate', 216 success: function (data) { 217 data = jQuery.parseJSON(data); 218 if (data.result != null) { 219 jQuery('.js-delivery-date').each(function(){ 220 jQuery(this).text(data.result); 221 }); 222 } 223 } 224 }); 225 } 226 } 227 } 228 229} 230var xxlpix_app_main = new Plugin_Main_Functions();
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.