PageSourceSearch

https://www.junggu.ulsan.kr/rfc3/user/domain/www.junggu.ulsan.kr.80/0/146.js?dt=202608261509

js junggu.ulsan.kr collected 2026-10-06 17:00:07 UTC 4,815 bytes, 177 lines download raw bytes

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.