PageSourceSearch

https://jncbs.co.kr/layouts/jncbs/js/script.js?20231025173219

js jncbs.co.kr collected 2026-10-02 22:06:15 UTC 8,550 bytes, 284 lines download raw bytes

1var iconArray = ["bi bi-broadcast-pin", "bi bi-tv", "bi bi-play-btn", "bi bi-headphones", "bi-card-list", "bi bi-camera", "bi bi-people", "bi bi-chat-right-dots"];
2jQuery(function($){
3   // 헤더 기본
4	const header = $('header')
5    const header_box = $('.header_box')
6    const header_sitemap = $('.header_sitemap')
7	const sitemap_close = $('.sitemap_close')
8    const header_sitemap_bg = $('.header_sitemap_bg')
9    header_box.click(function(){
10        $(this).toggleClass('on')
11        if($(this).hasClass('on')) {
12            header_sitemap.animate({'height' : 868 + 'px'})
13			header_sitemap_bg.show()
14			header.addClass('backColor')
15			$('.logo_d').show()
16			$('.logo_w').hide()
17			$('body').css({
18				'overflow' : 'hidden'
19			})
20        } else {
21            header_sitemap.animate({'height' : 0 + 'px'})
22			$(this).removeClass('on')
23            header_sitemap_bg.hide()
24			header.removeClass('backColor')
25            $('.logo_d').hide()
26			$('.logo_w').show()
27			$('body').css({
28				'overflow' : 'visible'
29			})
30        }
31    });
32	sitemap_close.click(function(){
33		$(".header_sitemap").animate({'height' : 0 + 'px'});
34		$('.header_box').removeClass('on');
35		$('body').css({
36			'overflow' : 'visible'
37		})
38	});
39    header_sitemap_bg.click(function(){
40        header_sitemap.animate({'height' : 0 + 'px'})
41        header_box.removeClass('on')
42        $(this).hide();
43    });
44
45	$('.depth').click(function(){
46        $(this).toggleClass('on')
47        if ($(this).hasClass('on')) {
48            $(this).find('ul').slideDown();
49        } else {
50            $(this).find('ul').slideUp();
51        }
52    });
53    $(document).mouseup(function(e){
54        const depth = $('.depth');
55        if (depth.has(e.target).length == 0) {
56            $('.depth').removeClass('on')
57            $('.depth').find('ul').slideUp();
58        }
59    });
60
61	/* mobile header menu on_off */
62    $(".m_header_menu").click(function(){
63        $(this).toggleClass('on')
64        if($(this).hasClass('on')) {
65            $(".m_header_sitemap").fadeIn();
66			header.addClass('scroll');
67			$('.logo_d').show();
68			$('.logo_w').hide();
69			$('body').css({
70				'overflow' : 'hidden'
71			});
72        } else {
73            $(".m_header_sitemap").fadeOut();
74			header.removeClass('scroll');
75			$('.logo_d').hide();
76			$('.logo_w').show();
77			$('body').css({
78				'overflow' : 'visible'
79			});
80        }
81    });
82
83	header.add('.header_item').mouseleave(function(){
84        dep2_a.removeClass('on')
85        $('.dep2_a_wrap a').removeClass('on')
86        $('.dep2_menu').hide()
87    });
88
89    $('.dep1_menu').mouseover(function(){
90        $(this).siblings().find('.dep2_menu').hide()
91        $(this).find('.dep2_menu').stop().fadeIn(300)
92    });
93    $('.dep2_menu').mouseleave(function(){
94        $(this).stop().fadeOut(300)
95        $('.gnb_depth3').hide()
96    });
97
98    const event_box_more_01 = $('.event_box_more_01')
99    const event_box_more_02 = $('.event_box_more_02')
100    event_box_more_01.mouseover(function(){
101        $(this).find('img').attr('src', 'layouts/jncbs/img/main/icon/icon_replay_on.png')
102        $(this).find('p').css({
103            'color' : '#0051a3',
104            'transition' : 'all .3s'
105        })
106        $(this).css({
107            'background-color' : 'rgba(255, 255, 255, .6)'
108        })
109    });
110    event_box_more_01.mouseleave(function(){
111        $(this).find('img').attr('src', 'layouts/jncbs/img/main/icon/icon_replay.png')
112        $(this).find('p').css({
113            'color' : '#fff',
114            'transition' : 'all .3s'
115        })
116        $(this).css({
117            'background-color' : ''
118        })
119    });
120    event_box_more_02.mouseover(function(){
121        $(this).find('img').attr('src', 'layouts/jncbs/img/main/icon/icon_radio_on.png')
122        $(this).find('p').css({
123            'color' : '#0051a3',
124            'transition' : 'all .3s'
125        })
126        $(this).css({
127            'background-color' : 'rgba(255, 255, 255, .6)'
128        })
129    });
130    event_box_more_02.mouseleave(function(){
131        $(this).find('img').attr('src', 'layouts/jncbs/img/main/icon/icon_radio.png')
132        $(this).find('p').css({
133            'color' : '#fff',
134            'transition' : 'all .3s'
135        })
136        $(this).css({
137            'background-color' : ''
138        })
139    });
140
141	/* mobile menu list up */
142    const dep1 = $('.menu_dep1').find('li')
143    const dep2 = $('.menu_dep2 > div')
144    dep1.eq(0).addClass('on');
145    dep2.hide().eq(0).show();
146    dep1.click(function(){
147        const idx = $(this).index();
148        $(this).addClass('on').siblings().removeClass('on');
149        for (let i = 0; i < 9; i++) {
150            if (idx === i) {
151                dep2.hide();
152                dep2.eq(i).show();
153            }
154        }
155    });
156
157	/* mobile menu_2 open on_off */
158    const dep2_a = $('.dep2_a')
159    dep2_a.removeClass('on')
160    dep2_a.mouseover(function(){
161        dep2_a.siblings().hide()
162        $(this).siblings().fadeIn(200)
163    })
164
165    $(window).scroll(function(){
166        let scroll = $('body, html').scrollTop();
167        if (scroll > 100) {
168            $('header').addClass('scroll')
169            $('.logo_d').show()
170            $('.logo_w').hide()
171			
172        } else {
173            $('header').removeClass('scroll')
174            $('.logo_d').hide()
175            $('.logo_w').show()
176			header.removeClass('backColor')
177        }
178    });
179    $('.pc_table').hide();
180    $('.pc_table').eq(0).show();
181
182	/* first menu */
183    $('.dep2_a_wrap:first-child').find('ul').addClass('first')
184    
185	$.each(dep1, function(idx, item) {
186		let el = $(item).find('i');
187		$(el).addClass(iconArray[idx]);
188	})
189
190    const partners_tab = $('.partners_tab').find('li')
191    partners_tab.click(function(){
192        let idx = $(this).index();
193        $(this).addClass('tab_on').siblings().removeClass('tab_on')
194        $('.pc_table').hide()
195        $('.pc_table').eq(idx).fadeIn()
196    });
197
198	/* tv on_off*/
199    $('.tvl_close').click(function(){
200        $('.tvl_wrap').fadeOut();
201    });
202    let rs_play = $('.rs_play');
203    rs_play.click(function(){
204        $(this).toggleClass('on');
205        if ($(this).hasClass('on')) {
206            $('.rs_play').not($(this)).removeClass('on')
207            $('.rs_play').find('i').attr('class', 'bi bi-play-fill')
208            $(this).find('i').attr('class', 'bi bi-pause-fill')
209        }else {
210            $(this).find('i').attr('class', 'bi bi-play-fill')
211        }
212    });
213
214    const ca_close = $('.cw_btn').find('div');
215    ca_close.click(function(){
216        $(this).toggleClass('up')
217        if($(this).hasClass('up')) {
218            $('.category_box_wrap').slideDown();
219            $(this).find('span').text('카테고리 접기')
220            $(this).find('.bi-chevron-down').attr('class','bi-chevron-up')
221        } else {
222			$('.category_box_wrap').slideUp();
223            $(this).find('span').text('카테고리 열기')
224            $(this).find('.bi-chevron-up').attr('class','bi-chevron-down')
225        }
226    });
227
228    $('.comment_btn').click(function(){
229        $('.comment_btn_hide').hide();
230        $(this).find('.comment_btn_hide').show();
231    })
232	$('body').mouseup(function(e){
233        if ($('#reply').has(e.target).length == 0) {
234            $('.comment_btn_hide').hide();
235        }
236    })
237
238    $(window).load(function(){
239        $('.loading').delay(500).fadeOut(500);
240    })
241    
242    
243}); 
244var audioFile;
245var curCategory, curAodCode;
246var isPlay = false;
247function clickListenButton(document_srl, category_srl, aod_code='') {
248    if (curCategory === category_srl && curAodCode == aod_code) {
249        if (isPlay) {
250            audioFile.pause();
251        } else {
252            audioFile.play();
253        }
254        return isPlay = !isPlay;
255    } else {
256        isPlay = !isPlay;
257    }
258    curCategory = category_srl;
259    curAodCode = aod_code;
260    $.ajax({
261        url: "ajax.getAOD.php",
262        type: "POST",
263        dataType: "JSON",
264        data: {document_srl: document_srl, category_srl: category_srl, aod_code: aod_code},
265        beforeSend: function() {
266            if (audioFile !== undefined && audioFile !== null) {
267                audioFile.pause();
268                audioFile.currentTime = 0;
269            }
270        },
271        success: function(json) {
272            if (json.res == "Y") {
273                audioFile = new Audio(json.aod);
274                audioFile.play();
275            } else {
276                alert(json.msg);
277                curCategory = '';
278                curAodCode = '';
279            }
280        }, error: function() {
281            alert('연결이 원활하지 않습니다. 다시 시도해 주세요');
282        }
283    })
284}

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.