PageSourceSearch

https://www.pnfs.or.kr/asset/js/main.js?v=2610060336

js pnfs.or.kr collected 2026-10-06 06:36:45 UTC 10,578 bytes, 348 lines download raw bytes

1$(document).ready(function(){
2	var wWidth = $(window).innerWidth();
3	if(wWidth < 768){
4		$('.search-wrap').show();
5        $('#sch-dim').hide();
6		mGolayer();
7	}else{
8		$('.search-wrap').hide();
9		$('#sch-dim').hide();
10		goLayer();
11	}
12	$('#sch-dim').click(function(){
13		$('.search-wrap').fadeOut();
14		$(this).fadeOut();
15		$('.btn-sch, .h-btn-sch').removeClass('on');
16		$('#gnb > li > a').on('mouseenter',function(e){
17			$('ul.sub-gnb').stop().slideDown();
18			$('.menu-bg').stop().slideDown();
19			$('#dim').fadeIn();
20		})
21	});
22
23	gnb();
24	tab();
25	search();
26	dialog();
27	subTab();
28	goTo();
29	accordion();
30
31	$('.accordion-type1 > li > a').on('click',function(){
32		$(this).parent('li').toggleClass('on');
33		$(this).parent('li').siblings().removeClass('on');
34		$(this).next('.acco-con').stop().slideToggle();
35		$(this).parent('li').siblings().children('.acco-con').stop().slideUp();
36	});	
37	
38	$('.review_txt').each(function(){
39		var length = 100000; //표시할 글자수 정하기
40        $(this).each(function(){
41            if( $(this).text().length >= length ){
42                $(this).text( $(this).text().substr(0,length)+'...');
43                //지정할 글자수 이후 표시할 텍스트
44			}
45             });
46        });
47
48		$('.more_btn').click(function(){
49			//$('.show_bagic').slideUp().removeClass('active');
50			var $more_show = $(this).parent('.bot_info').prev('.show_bagic');
51			$more_show.toggleClass('active');
52			if ($more_show.is('.active') == true ){
53				$(this).find('i').removeClass('xi-angle-down-min').addClass('xi-angle-up-min'); 
54				$(this).parent('.bot_info').prev('.show_bagic').slideDown(); 
55			} else {
56				$(this).find('i').removeClass('xi-angle-up-min').addClass('xi-angle-down-min'); 
57				$(this).parent('.bot_info').prev('.show_bagic').slideUp(); 
58			}
59		});
60
61		$('.mr_ab_txt').each(function(){
62        var length = 290; //표시할 글자수 정하기
63        $(this).each(function(){
64            if( $(this).text().length >= length ){
65                $(this).text( $(this).text().substr(0,length)+'...');
66                //지정할 글자수 이후 표시할 텍스트
67			}
68             });
69        });
70
71	//Original Articles
72//	$('.go_list').mouseenter(function(){
73//		$(this).find('.go_first').addClass('on');
74//		$(this).find('li').show();
75//	});
76//	$('.go_list').mouseleave(function(){
77//		$(this).find('.go_first').removeClass('on');
78//		$(this).find('.go_first').siblings().hide();
79//	});
80//
81//	$('.go_list > li > a').click(function(){
82//		$('html,body').animate({scrollTop:$(this.hash).offset().top}, 300);
83//	});
84
85	//Instruction for Authors
86      $(".tab_content").hide(); //Hide all content
87            $("ul.tabs li:first").addClass("active").show(); //Activate first tab
88            $(".tab_content:first").show(); //Show first tab content
89
90            //On Click Event
91            $("ul.tabs li").click(function() {
92
93                $("ul.tabs li").removeClass("active"); //Remove any "active" class
94                $(this).addClass("active"); //Add "active" class to selected tab
95                $(".tab_content").hide(); //Hide all tab content
96
97                var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
98                $(activeTab).fadeIn(); //Fade in the active ID content
99                return false;
100         });
101
102		 $('.down_section').mouseenter(function(){
103			$(this).find('ul').show();
104		 });
105		  $('.down_section').mouseleave(function(){
106			$(this).find('ul').hide();
107		 });
108
109	//Archive 검색메뉴 열기
110	$('.search_menu_btn').click(function(){
111		var $all_menu = $('.search_wrap');
112
113		if ($all_menu.is(':visible')){
114			$all_menu.slideUp();
115			$(this).removeClass('on').text('Word in the Search  ▼');
116		} else {
117			 $all_menu.slideDown();
118			 $(this).addClass('on').text('Word in the Search  ▲');
119
120		}		
121	});
122});
123
124function gnb(){
125	$('#gnb > li > a').on('mouseenter',function(e){
126		$('ul.sub-gnb').stop().slideDown();
127		$('.menu-bg').stop().slideDown();
128		$('#dim').stop().fadeIn();
129	});
130	$('.gnb-wrap').on('mouseleave',function(e){
131		$('.sub-gnb').stop().slideUp(200);
132		$('.menu-bg').stop().slideUp(200);
133		$('#dim').stop().fadeOut(200);
134	});
135}
136/*
137function rollBanner(){	
138	$('.rolling-banner').not('.slick-initialized').slick({
139		arrows: false,
140		dots: true,
141		autoplay: true,
142		autoplaySpeed: 3000,
143		infinite: true,
144		slidesToShow: 1,
145		slidesToScroll: 1,
146		speed: 1000
147	});
148}*/
149
150function tab(){
151	//$('.tab-con-wrap').hide().first().show();
152	$('.tab-menu > li').on('click',function(e){
153		var cnt = $(this).index();
154		$('.tab-con-wrap').stop().fadeOut().hide().eq(cnt).stop().fadeIn();
155		$('.tab-menu > li').removeClass('on');
156		$(this).addClass('on');
157	});
158	$('.tab-con-wrap2').hide().first().show();
159	$('.tab-menu2 > li').on('click',function(e){
160		var cnt = $(this).index();
161		$('.tab-con-wrap2').stop().fadeOut().hide().eq(cnt).stop().fadeIn();
162		$('.tab-menu2 > li').removeClass('on');
163		$(this).addClass('on');
164	});
165}
166
167
168/* Metrics */
169function dialog() {
170	var dialogBox = $('.dialog-wrap'),
171		dialogTrigger = $('.dialog__trigger'),
172		dialogClose = $('.dialog__close'),
173		dialogTitle = $('.dialog__title'),
174		dialogContent = $('.dialog__content'),
175		dialogAction = $('.dialog__action');
176
177	// Open the dialog
178	dialogTrigger.on('click', function(e) {
179		$('#dim2').stop().fadeIn();
180		dialogBox.toggleClass('dialog--active');
181		e.stopPropagation()
182	});
183
184	// Close the dialog - click close button
185	dialogClose.on('click', function() {
186		$('#dim2').stop().fadeOut();
187		dialogBox.removeClass('dialog--active');
188	});
189
190	// Close the dialog - press escape key // key#27
191	$(document).keyup(function(e) {
192		if (e.keyCode === 27) {
193			$('#dim2').stop().fadeOut();
194			dialogBox.removeClass('dialog--active');
195		}
196	});
197
198	// Close dialog - click outside
199	$(document).on("click", function(e) {
200		if ($(e.target).is(dialogBox) === false &&
201			$(e.target).is(dialogTitle) === false &&
202			$(e.target).is(dialogContent) === false &&
203			$(e.target).is(dialogAction) === false) {
204			dialogBox.removeClass("dialog--active");
205			$('#dim2').stop().fadeOut();
206		}
207	});
208
209};
210
211
212$(window).resize(function(e){
213	var wWidth = $(window).innerWidth();
214	if(wWidth < 768){
215		$('.search-wrap').show();
216        $('#sch-dim').hide();
217		//mScroll();
218		mGolayer();
219	}else{
220		$('.search-wrap').hide();
221		$('#sch-dim').hide();
222		goLayer();
223	}
224	scroll();
225});
226
227$(window).scroll(function(e){
228	var wWidth = $(window).width();
229	
230	scroll();
231});
232
233function search(){
234	$('.btn-sch, .h-btn-sch').on('click',function(e){
235		if($('.search-wrap').hasClass('open')){
236			$('#sch-dim').stop().fadeOut();
237			$('.btn-sch, .h-btn-sch').removeClass('on');
238			$('.search-wrap').stop().fadeOut().removeClass('open');
239			$('#gnb > li > a').on('mouseenter',function(e){
240				$('ul.sub-gnb').stop().slideDown();
241				$('.menu-bg').stop().slideDown();
242				$('#dim').fadeIn();
243			});
244		}else{
245			$('#sch-dim').stop().fadeIn();
246			$('.btn-sch, .h-btn-sch').addClass('on');
247			$('.search-wrap').addClass('open').stop().fadeIn();
248			$('#gnb > li > a').off('mouseenter');
249
250			$('.sub-gnb').stop().slideUp(200);
251			$('.menu-bg').stop().slideUp(200);
252			$('#dim').fadeOut(200);
253		}
254	});
255}
256
257//function mScroll(){
258//	if($(this).scrollTop() > 70){
259//		$('.top, .btn-sch, .h-btn-sch, .search-wrap').addClass('fixed');
260		
261//	}else{
262//		$('.top, .btn-sch, .h-btn-sch, .search-wrap').removeClass('fixed');
263//	}
264//}
265
266function scroll(){
267	if($(this).scrollTop() > 50){
268		$('.top, .btn-sch, .search-wrap').addClass('fixed');
269		$('.btn-sch').show();
270	}else{
271		$('.top, .btn-sch, .search-wrap').removeClass('fixed');
272	}
273}
274
275function noLink(){
276	$('.no-link, .right-util > li > a, .sitemap-list > li > ul > li > a, .review_txt, .tab-menu li > a, .la-tag a, .more-link a, .footer-menu > li .sub-footer-menu > li > a, #gnb > li > a, #gnb > li .sub-gnb > li > a').on('click',function(e){
277		$(this).attr('href','#n');
278		alert('Coming Soon.');
279		return false;		
280	});
281}
282
283function subTab(){
284	$('.sub-tabcon').hide().first().show();
285	$('.sub-tabmenu > li').on('click',function(e){
286		var cnt = $(this).index();
287		$('.sub-tabcon').hide().eq(cnt).stop().fadeIn();
288		$(this).addClass('on');
289		$('.sub-tabmenu > li').not(this).removeClass('on');
290	});
291}
292
293function goTo(){
294	var text = $('.go-to-list > li.on').text();
295	//console.log(text);
296	$('.click-go-to').html('Go to<i class="xi-angle-down">');
297	$('.click-go-to').on('click',function(e){
298		$(this).next('ul').stop().slideToggle();
299	});
300	$('.go-to-contents').hide().first().show();
301	$('.go-to-list > li').on('click',function(e){
302		var cnt = $(this).index();
303		$(this).addClass('on');
304		$('.go-to-list > li').not(this).removeClass('on');
305		$('.go-to-contents').hide().eq(cnt).stop().fadeIn();
306		$('.go-to-list').stop().slideUp();
307		var text = $('.go-to-list > li.on').text();
308		//console.log(text);
309		$('.click-go-to').html(text+'<i class="xi-angle-down">');
310	});
311}
312
313function goLayer(){
314	// PC Go to 이동시 아이콘 원복
315	$('.goto_layer > a').parent('div').children('a').children('i').attr('class','xi-caret-down-min');
316	// 모바일 Go to 이벤트 끄고 이벤트 시작
317	$('.goto_layer > a').off('click').mouseenter(function(e){
318		$(this).next('ul').stop().slideDown(200);
319		$('.goto_layer > a').not(this).next('ul').stop().slideUp(200);
320	});
321	$('.goto_layer').off('click').mouseleave(function(e){
322		$('.go_list').stop().slideUp(200);
323	});
324	$('.go_list > li > a, .list-type4 > li > a, .view-article ul li a.scroll-active').on('click',function(){
325		$('html,body').stop().animate({scrollTop:$(this.hash).offset().top - 80}, 300);
326	});
327}
328
329function mGolayer(){
330	// PC Go to 이벤트 끄기
331	$('.goto_layer > a').off('mouseenter');
332	$('.goto_layer').off('mouseleave');
333	$('.goto_layer > a').off('click').on('click',function(e){
334		// 해당 Go to 클릭시 펼치고 웹아이콘 변경
335		$(this).next('ul').stop().slideToggle(200);
336		$(this).find('i').toggleClass('xi-caret-up-min').toggleClass('xi-caret-down-min');
337		// 다른 Go to 클릭시 접고 아이콘도 원복
338		$('.goto_layer > a').not(this).next('ul').stop().slideUp(200);
339		$('.goto_layer > a').not(this).parent('div').children('a').children('i').attr('class','xi-caret-down-min');
340	});
341	$('.go_list > li > a, .list-type4 > li > a, .view-article ul li a.scroll-active').off('click').on('click',function(){
342		// 펼쳐진 메뉴 클릭시 이동하고, 모든 Go to 접고, 웹아이콘 원복
343		$('html,body').stop().animate({scrollTop:$(this.hash).offset().top - 60}, 300);
344		$('.goto_layer > ul').stop().slideUp(200);
345		$('.goto_layer > a').parent('div').children('a').children('i').attr('class','xi-caret-down-min');
346	});
347}
348

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.