1; 2(function () { 3 'use strict'; 4 5 var _this = {}; 6 7 var $information_top = $('#js-information-top'), 8 information_top_swiper = '#js-information-top .js-information-top-swiper'; 9 10 var $information_bottom = $('#js-information-bottom'), 11 information_bottom_swiper = '#js-information-bottom .js-information-bottom-swiper'; 12 13 var $information_modal = $('#js-information-modal'), 14 information_modal_swiper = '#js-information-modal .js-information-modal-swiper'; 15 16 function Information() { 17 _this = this; 18 this.init(); 19 } 20 21 Information.prototype.init = function () { 22 let $information = $('.js-information'); 23 24 // $information.each(function() { 25 // let ctaBtn_length = $(this).find('._clip_btn').length; 26 27 // if (ctaBtn_length >= 1) 28 // { 29 // $(this).find('._information_modal__close').css('z-index', -1); 30 31 // $(this).find('._clip_btn').bind('click', function() { 32 // let _this = $(this); 33 // _this.closest('.js-information').find('._information_modal__close').trigger('click'); 34 // }); 35 // } 36 // }); 37 38 if ($information_top.find('.swiper-slide').length > 0) { 39 $information_top.addClass('_information_bar--active'); 40 41 this.initSwiper($information_top, information_top_swiper, 'infomation_top_toggle'); 42 //console.log("console::",sessionStorage.getItem('infomation-top-toggle')); 43 if (!$.cookie('infomation_top_toggle')) { 44 //alert('ssss') 45 // $information_top.hide(); 46 } else { 47 //alert('aaaa') 48 this.resizeInfoTop(); 49 } 50 } else { 51 //alert(sessionStorage.getItem('infomation-top-toggle')); 52 53 $information_top.hide(); 54 } 55 56 if ($information_bottom.find('.swiper-slide').length > 0) { 57 this.initSwiper($information_bottom, information_bottom_swiper, 'infomation_bottom_toggle'); 58 if (!$.cookie('infomation_bottom_toggle')) { 59 $information_bottom.show(); 60 setTimeout(() => { 61 window.dispatchEvent(new Event('resize')); 62 }, 300); 63 } 64 } 65 66 if ($information_modal.find('.swiper-slide').length > 0) { 67 if (!$.cookie('infomation_modal_toggle')) { 68 //sessionStorage.setItem('infomation-modal-toggle', true); 69 $.cookie('infomation_modal_toggle',true); 70 $information_modal.modal({ 71 backdrop: 'static' 72 }); 73 74 $information_modal.modal('show'); 75 76 $information_modal.on('shown.bs.modal', function () { 77 _this.initModalSwiper(); 78 }); 79 } 80 } 81 }; 82 83 Information.prototype.resizeInfoTop = function () { 84 // setTimeout(() => { 85 //console.log('._information'); 86 //$('._information').removeClass('_information--hide'); 87 //gsap.set('._information',{height:0}); 88 gsap.to('._information_con', 0, { 89 // height: 'auto', 90 // delay: 0, 91 // visibility: 'visible', 92 onUpdate: () => { 93 //console.log($('._information_top__content').height()); 94 try { 95 ScrollTrigger.refresh(); 96 } catch (e) { 97 //console.log("ScrollTrigger catch"); 98 } 99 if (window.sidebar) window.sidebar.updateSticky(); 100 if (window.stickyThumbnail) window.stickyThumbnail.updateSticky(); 101 if (window.stickyInventory) window.stickyInventory.updateSticky(); 102 window.dispatchEvent(new Event('resize')); 103 }, 104 onComplete: function () { 105 if (window.sidebar) window.sidebar.updateSticky(); 106 if (window.stickyThumbnail) window.stickyThumbnail.updateSticky(); 107 if (window.stickyInventory) window.stickyInventory.updateSticky(); 108 window.dispatchEvent(new Event('resize')); 109 } 110 }); 111 // }, 1) 112 } 113 114 Information.prototype.initSwiper = function ($target, swiper, session) { 115 var barSwiper = new Swiper(swiper, { 116 effect: 'fade', 117 autoHeight: true, 118 allowTouchMove: false, 119 autoplay: { 120 delay: 8000 121 } 122 }); 123 124 $target.find('.js-information-close').on('click', function () { 125 $.cookie(session,true); 126 //sessionStorage.setItem(session, true); 127 $target.find('._headerGroup_wrap').css({ 128 'margin-top': '0' 129 }); 130 $target.addClass('hide'); 131 gsap.to($target.find('._information_con'), .3, { 132 height: 0, 133 onUpdate: function () { 134 try { 135 ScrollTrigger.refresh(); 136 } catch (e) { 137 //console.log("ScrollTrigger catch"); 138 } 139 if (window.stickyThumbnail) window.stickyThumbnail.updateSticky(); 140 if (window.stickyInventory) window.stickyInventory.updateSticky(); 141 }, 142 onComplete: function () { 143 window.dispatchEvent(new Event('resize')); 144 $(window).trigger('resize'); 145 } 146 }) 147 }); 148 149 barSwiper.on('slideChange', function () { 150 _this.resizeInfoTop(); 151 }); 152 153 $(swiper).mouseenter(function () { 154 _this.stopSwiper($(this)[0]); 155 }); 156 157 $(swiper).mouseleave(function () { 158 _this.startSwiper($(this)[0]); 159 }); 160 }; 161 162 Information.prototype.initModalSwiper = function () { 163 var modalSwiper = new Swiper(information_modal_swiper, { 164 effect: 'fade', 165 autoHeight: true, 166 autoplay: { 167 delay: 8000 168 } 169 }); 170 171 $(information_modal_swiper).mouseenter(function () { 172 _this.stopSwiper($(this)[0]); 173 }); 174 175 $(information_modal_swiper).mouseleave(function () { 176 _this.startSwiper($(this)[0]); 177 }); 178 }; 179 180 Information.prototype.stopSwiper = function (target) { 181 target.swiper.autoplay.stop(); 182 }; 183 184 Information.prototype.startSwiper = function (target) { 185 target.swiper.autoplay.start(); 186 }; 187 188 $(function () { 189 new Information(); 190 }); 191})();
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.