PageSourceSearch

https://www.kf.or.kr/js/web/kf/sub.js

js kf.or.kr collected 2026-10-02 03:04:35 UTC 6,146 bytes, 226 lines download raw bytes

1$(function(){
2
3	
4	//SNS 공유하기 
5	$('.snsBox .btnShare').on('click',function(){
6		if($(this).attr('title')=='공유하기 하위메뉴닫힌상태'){
7		$(this).attr('title','공유하기 하위메뉴열린상태');
8		} else{$(this).attr('title','공유하기 하위메뉴닫힌상태');}
9	});
10	
11	
12	$('.faq_arr').attr('title','축소됨');
13	$('.faq_arr').on('click',function(){
14		if($(this).parent('a').parent('li.faq').hasClass('on')==true){
15		$(this).attr('title','축소됨');
16		} else{
17			$(this).attr('title','확장됨');
18		}
19	});
20	
21	$( '.titTy2 > a > em').attr('title','축소됨');
22	$( '.titTy2 > a > em').on('click',function(){
23		if($(this).attr('title')=='축소됨'){
24		$(this).attr('title','확장됨');
25		} else{$(this).attr('title','축소됨');}
26	});
27
28	
29	
30	
31
32});
33
34$(function() {
35	// layer Popup
36	$(document).on( 'click', '.lypopOpen', function(){
37        $hash = $(this.hash);
38        $hash.fadeIn(); 
39    });
40
41	$(document).on( 'click', '.lypopClose', function(){
42        $hash = $(this.hash);
43        $hash.fadeOut();
44    });
45
46
47  //국제교류기여금 
48	$('.cardShow').on('click', function(e){
49		e.preventDefault();
50		$('.card_pop_wrap').fadeIn();
51		$('.card_pop_wrap').focus();
52		$('#cardNews').slick('setPosition');
53	});
54	$('.card_close').on('click focusout', function(e){
55		$('.card_pop_wrap').fadeOut();
56		$('.cardShow').focus();
57	});
58	$('#cardNews').slick({
59		slidesToShow: 1,
60		slidesToScroll: 1,
61		dots:false,
62		arrows:true,
63		infinite:false
64	});
65	$('.card_pop').mCustomScrollbar({ theme:"inset-2" });
66	
67  $(window).trigger("resize");
68
69  setTimeout(function() {
70    $('body').addClass('start');
71  }, 100);
72
73
74
75  //tab
76  $(function() {
77/*    $("#con_com_box > div").hide(); // Initially hide all content
78    $(".tab_st1 li:first").attr("class", "on"); // Activate first tab
79    $("#con_com_box > div:first").fadeIn(); // Show first tab content
80
81    $('.tab_st1 a').click(function(e) {
82      e.preventDefault();
83      $("#con_com_box > div").hide(); //Hide all content
84      $(".tab_st1 li").attr("class", ""); //Reset id's
85      $(this).parent().attr("class", "on"); // Activate this
86      $('#' + $(this).attr('title')).fadeIn(); // Show content for on tab
87    });*/
88  });
89
90  $(".login_wrap #con_com2 .idLogin").click(function(){
91    $('.id_login_frm').addClass('active');
92    $('.ctfc_login_frm').removeClass('active');
93  });
94  $(".login_wrap #con_com2 .CtfcLogin").click(function(){
95    $('.ctfc_login_frm').addClass('active');
96    $('.id_login_frm').removeClass('active');
97  });
98
99  $(".terms_wrap ul li .pop_open_1").click(function(e){
100		e.preventDefault();
101		$('#terms_pop01').addClass('open');
102	});
103	
104	$(".terms_wrap ul li .pop_open_2").click(function(e){
105		e.preventDefault();
106		$('#terms_pop02').addClass('open');
107	});
108	
109  $(".popSetup .popClose").click(function(e){
110		e.preventDefault();
111		$('.popSetup').removeClass('open');
112});
113
114  // SCROLL 이벤트
115  if($('#cntntsView section').length > 0){
116	  var controller = new ScrollMagic.Controller();
117	  new ScrollMagic.Scene({
118	      triggerElement: '.section1',
119	      offset: -300
120	    })
121	    //.addIndicators()
122	    .reverse(false)
123	    .setClassToggle('.section1', 'active')
124	    .addTo(controller);
125  }
126});
127
128$(window).on('load resize', function() {
129  thumbResize(); //이미지비율조정
130});
131
132//thumbResize
133var thumbResize = function() {
134  var divs = document.querySelectorAll('.imgcut .img');
135  for (var i = 0; i < divs.length; ++i) {
136    var div = divs[i];
137    var divAspect = div.offsetHeight / div.offsetWidth;
138    div.style.overflow = 'hidden';
139
140    var img = div.querySelector('.imgcut .img > img');
141    var imgAspect = img.height / img.width;
142
143    if (imgAspect <= divAspect) {
144      // 이미지가 div보다 납작한 경우 세로를 div에 맞추고 가로는 잘라낸다
145      var imgWidthActual = div.offsetHeight / imgAspect;
146      var imgWidthToBe = div.offsetHeight / divAspect;
147      var marginLeft = -Math.round((imgWidthActual - imgWidthToBe) / 2)
148      img.style.cssText = 'width: auto;height:100%;';
149    } else {
150      // 이미지가 div보다 길쭉한 경우 가로를 div에 맞추고 세로를 잘라낸다
151      img.style.cssText = 'width:100%; height:auto;';
152    }
153  }
154}
155
156function fnLoad() {
157	window.onbeforeunload = function() {
158		$("#webinaForm").ajaxSubmit({
159			data : $("#webinaForm").serialize(),
160			url : "/${ctx}/vm/virtl/deleteChatUser.do",
161			dataType : "json",
162			async: true,
163			success : function(result) {
164
165			},
166	       	  error : function(result){
167
168			}
169		});
170    }
171}
172
173//개인정보처리방침
174$(function() {
175$('.open-table').on('click', function(){
176if($(this).hasClass('active')){
177$(this).removeClass('active').text('이전 처리방침 보기');
178$(this).parents('.contsBtn').find('span').text('이전 처리방침 보기');
179$('.old_policy').hide();
180}
181else{
182$(this).addClass('active').text('이전 처리방침 닫기');
183$(this).parents('.contsBtn').find('span').text('이전 처리방침 닫기');
184$('.old_policy').show();
185}
186});
187});
188
189//한국미술 전문가 육성 click 추가 
190$(function() {
191	  $('#contactUsInsertPage').on('click', function() {
192	    goCommonMyPage('kf', '', '/kf/ad/cu/contactUsInsertPage.do');
193	  });
194	});
195
196
197
198//사전정보공표 일때의 caption 수정 
199$(function () {
200    function setCaption() {
201        const menu = $('.lnb_dep03.mobLnb > .active a').text().trim();
202        const title = $('.titTy1_1').text().trim();
203
204        if (menu === '사전정보공표' && title) {
205            $('caption').text(title + '에 대한 게시판입니다.');
206            return true;
207        }
208
209        return false;
210    }
211
212    if (!setCaption()) {
213        // 메뉴가 나중에 만들어지는 경우 재시도
214        const timer = setInterval(function () {
215            if (setCaption()) {
216                clearInterval(timer);
217            }
218        }, 100);
219        
220        setTimeout(function () {
221            clearInterval(timer);
222        }, 5000);
223    }
224});
225
226

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.