PageSourceSearch

https://www.korea.kr/jsV5/web.main.js?time=202610021915

js korea.kr collected 2026-10-02 10:15:16 UTC 4,905 bytes, 175 lines download raw bytes

1$(function(){
2	let ac = 'active';
3	
4	$('.layer_popup_full .wrap_close .close, .layer_popup_full .page .page_korea a, .layer_popup_full .logo a').on('click',function(){
5		$('html').removeClass('ovh');
6		$('.layer_popup_full').fadeOut();
7		//$('.layer_popup_full').removeClass('active');
8		//return false;
9	});
10	
11	setTimeout(function(){
12		$('.layer_popup_full.nlday').fadeOut();
13		$('html').removeClass('ovh');
14	},5000);
15
16	//실시간 보도자료 닫기
17	$('.realtime .close').on('click',function(){
18		$('.main_news_r').removeClass(ac);
19	});
20
21	//중간 배너
22	const mid_banner = new Swiper('.mid_banner_slide', {
23		direction:'vertical',
24		slidesPerView:1,
25		spaceBetween:0,
26		speed:400,
27		loop: true,
28		autoplay: {
29			delay:3000,
30			disableOnInteraction: false,
31			pauseOnMouseEnter: true
32		},
33		navigation: {
34			nextEl: '.mid_banner_slide .next',
35			prevEl: '.mid_banner_slide .prev',
36		},
37		on: {
38			init: function(){
39				if(this.slides.length == 1) {
40					$('.mid_banner_slide').addClass('disabled');
41				}
42			},
43		},
44	});
45
46	function updatePagination(swiper){
47		$(swiper.pagination.bullets).each(function(index){
48			if(index === swiper.realIndex) {
49				$(this).attr('title','선택됨');
50			} else {
51				$(this).removeAttr('title');
52			}
53		});
54	}
55
56	const top_banner_slide = new Swiper('.main_top_banner .slide', {
57		slidesPerView: 1,
58		spaceBetween: 0,
59		speed: 600,
60		loop: true,
61		navigation: {
62			nextEl: '.main_top_banner .next',
63			prevEl: '.main_top_banner .prev'
64		},
65		pagination: {
66			el: '.main_top_banner .swiper-pagination',
67			clickable: true,
68			renderBullet: function (index, className){
69				return '<button class="' + className + '"><span>' + (index + 1) + '번 슬라이드 이동' + '</span></button>';
70			}
71		},
72		autoplay: {
73			delay: 3000,
74			disableOnInteraction: false,
75			pauseOnMouseEnter: true
76		},
77		on: {
78			init: function(){
79				if(this.slides.length == 1) {
80					$('.main_top_banner').addClass('disabled');
81				}
82				$('.main_top_banner .swiper-button-play').on('click', function(){
83					if($(this).is('.play')) {
84						$(this).removeClass('play');
85						$(this).addClass('pause');
86						$(this).find('span').text('자동슬라이드 멈춤');
87						top_banner_slide.autoplay.start();
88					}else if ($(this).is('.pause'))	{
89						$(this).removeClass('pause');
90						$(this).addClass('play');
91						$(this).find('span').text('자동슬라이드 시작');
92						top_banner_slide.autoplay.stop();
93					}
94				});
95				$('.main_top_banner .swiper-wrapper').hover(function(){
96					top_banner_slide.autoplay.stop();
97				}, function(){
98					if($('.main_top_banner .swiper-button-play').hasClass('pause')){
99						top_banner_slide.autoplay.start();
100					}
101				});
102				updatePagination(this);
103			},
104			slideChange: function(){
105				updatePagination(this);
106			}
107		},
108	});
109
110	//부처별뉴스
111	$('.ministry_slide').children('.swiper-wrapper').find('li a').on('focus', function(e){
112		e.preventDefault();
113		var idx = $(this).parents('.swiper-slide').index();
114		ministry_slide.slideTo(idx);
115	});
116
117	$('.ministry_slide .playing').on('click', function(){
118		const t = $(this);
119		if(t.hasClass('pause')){
120			t.removeClass("pause").addClass("play").find('span').text('재생');
121			ministry_slide.autoplay.stop();
122		}else if (t.hasClass('play')) {
123			t.removeClass('play').addClass("pause").find('span').text('정지');
124			ministry_slide.autoplay.start();
125		}
126	});
127
128	//인기뉴스, 최신뉴스 탭메뉴
129	$('.def_tab > li > button').on('click focus',function(i){
130		const t = $(this);
131		t.attr('title','선택됨').parent().addClass(ac).siblings().removeClass(ac).children('button').removeAttr('title');
132		const hash = (t.text() === '최신뉴스') ? 'newest' : 'mostView';
133		window.location.hash = hash;
134	});
135
136	$('.event_thumb_lst .d_day').each(function(){
137		const t = $(this);
138		//console.log(t.text());
139		if(t.text() === '오늘 마감'){
140			t.addClass('today');
141		}
142	});
143	
144	$('.kwd_lst > li .item').on('mouseenter focusin', function(){
145		$(this).parent().addClass('active').siblings().removeClass('active')
146    }).on('mouseleave focusout', function(){
147		$(this).parent().removeClass('active');
148	});
149	
150});
151
152$(window).on('load', function(){
153	
154	const hash = window.location.hash;
155	switch(hash){
156		case '#newest':
157		$('.def_tab > li > button:contains("최신뉴스")').click();
158		break;
159	}
160
161	/*
162	if ($('.mid_banner .swiper-slide:not(.swiper-slide-duplicate)').length < 2) {
163		$('.mid_banner_slide .next').css('display', 'none');
164		$('.mid_banner_slide .prev').css('display', 'none');
165		console.log('중간배너 슬라이드가 2개 미만일 경우 발생하는 event');
166	} else {
167		$('.mid_banner_slide .next').css('display', 'inline-block');
168		$('.mid_banner_slide .prev').css('display', 'inline-block');
169	}
170	*/
171
172	// 부처별 뉴스 전체보기 위치 변경
173	//let viewPosition = $('.sec2 .title1 span').width();
174	//$('.ministry_slide .all_view').css('left', (viewPosition + 68) + 'px');
175})

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.