1document.addEventListener("DOMContentLoaded", function () { 2 function addClassOnScrollToSection( 3 sectionId, 4 className, 5 targetElementSelector 6 ) { 7 const targetSection = document.getElementById(sectionId); 8 const targetElement = document.querySelector(targetElementSelector); 9 10 if (!targetSection || !targetElement) { 11 return; 12 } 13 14 function checkScrollPosition() { 15 const scrollPosition = window.scrollY + window.innerHeight / 2; // Middle of the viewport 16 const sectionTop = targetSection.offsetTop; 17 const sectionBottom = sectionTop + targetSection.offsetHeight; 18 19 if (scrollPosition >= sectionTop && scrollPosition < sectionBottom) { 20 targetElement.classList.add(className); 21 } else { 22 targetElement.classList.remove(className); 23 } 24 25 26 } 27 28 window.addEventListener("scroll", function () { 29 checkScrollPosition(); 30 }); 31 32 checkScrollPosition(); 33 } 34 35 const sections = ["s-1", "s-2", "s-3", "s-4", "s-5", "s-6"]; 36 sections.forEach(function (elem) { 37 addClassOnScrollToSection(elem, "active", `a[href='#${elem}']`); 38 }); 39}); 40 41 42/*주ììë¹ì¤*/ 43jQuery(function($){ 44 // List Tab Navigation 45 var $tab_list = $('.tab.list'); 46 $tab_list.removeClass('jx').find('ul ul').hide(); 47 $tab_list.find('li li.active').parents('li').addClass('active'); 48 $tab_list.find('li.active>ul').show(); 49 $tab_list.each(function(){ 50 var $this = $(this); 51 $this.height($this.find('li.active>ul').height()+60); 52 }); 53 function listTabMenuToggle(event){ 54 var $this = $(this); 55 $this.next('ul').show().parent('li').addClass('active').siblings('li').removeClass('active').find('>ul').hide(); 56 $this.closest('.tab.list').height($this.next('ul').height()+60); 57 if($this.attr('href') === '#'){ 58 event.preventDefault(); // 기존 `return false;` ì ê±° 59 } 60 } 61 $tab_list.find('>ul>li>a').click(listTabMenuToggle).focus(listTabMenuToggle); 62 63}); 64 65var mySwiper = new Swiper ('.swiper-container', 66 { 67 speed:3000, 68 direction: 'horizontal', 69 navigation: 70 { 71 nextEl: '.swiper-button-next', 72 prevEl: '.swiper-button-prev', 73 }, 74 pagination: 75 { 76 el: '.swiper-pagination', 77 dynamicBullets: true, 78 }, 79 zoom: true, 80 keyboard: 81 { 82 enabled: true, 83 onlyInViewport: false, 84 }, 85 mousewheel: 86 { 87 invert: true, 88 }, 89 autoplay: 90 { 91 delay: 2000, 92 }, 93 loop: true, 94 }); 95 96 /*주ììë¹ì¤*/ 97document.addEventListener('DOMContentLoaded', function () { 98 var tabSliders = document.querySelectorAll('.tab-content-slider'); 99 100 tabSliders.forEach(function (slider, index) { 101 var sliderId = index + 1; 102 var mySwiper = new Swiper(slider, { 103 observer: true, 104 observeParents: true, 105 slidesPerView: 1, 106 spaceBetween: 20, 107 centeredSlides: true, 108 /*autoplay: { 109 delay: 3000, 110 disableOnInteraction: false 111 },*/ 112 navigation: { 113 nextEl: ".swiper-button-next", 114 prevEl: ".swiper-button-prev" 115 }, 116 }); 117 }); 118 119document.querySelectorAll('.tab').forEach(function (tab) { 120 tab.addEventListener('click', function () { 121 // 기존 íì±íë í ì í 122 var activeTab = document.querySelector('.tab.active'); 123 if (activeTab) { 124 activeTab.classList.remove('active'); 125 } 126 127 // í´ë¦í í íì±í 128 this.classList.add('active'); 129 130 // ì¬ë¼ì´ë íì±í 131 var targetSliderId = this.getAttribute('data-tab'); 132 document.querySelectorAll('.tab-content-slider').forEach(function (slider) { 133 if (slider.getAttribute('data-slider') === targetSliderId) { 134 slider.style.display = 'block'; 135 slider.swiper?.update(); // Swiperê° ì´ê¸°íë ê²½ì°ë§ ì ë°ì´í¸ 136 } else { 137 slider.style.display = 'none'; 138 } 139 }); 140 }); 141}); 142 143 144 document.addEventListener("click", function (event) { 145 // í´ë¦í ììê° spanì´ë©´, ë¶ëª¨ a.titleì ì°¾ëë¡ ìì 146 let target = event.target.closest("span")?.closest("a.title") || event.target.closest("a.title"); 147 if (!target) return; // a.titleì ì°¾ì§ ëª»íë©´ ì¢ ë£ 148 149 console.log("aaaaaaaaaaaaaa"); // ì½ì ì¶ë ¥ íì¸ 150 151 event.preventDefault(); // a íê·¸ì 기본 ëì(íì´ì§ ì´ë) ë°©ì§ 152 153 let tabs = document.querySelectorAll(".tab_content > a.title"); 154 let index = Array.from(tabs).indexOf(target); // íì¬ í´ë¦í íì ì¸ë±ì¤ 찾기 155 156 if (index === 0) { 157 if (typeof mySwiper !== "undefined") { 158 mySwiper.slideTo(0, 0);
158 // 첫 ë²ì§¸ ì¬ë¼ì´ë ì´ë 159 mySwiper.autoplay.start(); 160 } 161 } else if (index === 1) { 162 if (typeof mySwiper2 !== "undefined") { 163 mySwiper2.slideTo(0, 0); // 첫 ë²ì§¸ ì¬ë¼ì´ë ì´ë 164 mySwiper2.autoplay.start(); 165 } 166 } 167 }); 168 169 170 171 172}); 173 174 175 176 177
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.