PageSourceSearch

https://gwangyang.go.kr/kor/js/sub.js

js gwangyang.go.kr collected 2026-10-02 07:32:38 UTC 5,610 bytes, 174 lines download raw bytes

1(function($) {
2    'use strict';
3
4    window.element = {};
5    $(function() {
6        var $window = element.$window = $(window),
7            $html = element.$html = $('html'),
8            $container = element.$container = $('#container');
9
10        /* cms 5차 탭메뉴 */
11        var $tabMenuType1 = $container.find('.tab_menu.type1'),
12            $tabSelect = $tabMenuType1.find('.tab_select'),
13            $tabItem = $tabMenuType1.find('.tab_item');
14
15        $tabSelect.each(function (){
16            $(this).on('click', function(event) {
17                $(this).next('.tab_panel').stop().slideToggle('250', 'easeOutExpo');
18                $(this).parent().toggleClass('active1');
19            });
20        });
21
22        $window.on('screen', function(event) {
23            if($(window).width() < 641){
24                $tabItem.on('click', function(event) {
25                    $(this).parents('.tab_panel').slideUp('250', 'easeOutExpo');
26                    $tabMenuType1.removeClass('active');
27                });
28            }
29        });
30        
31        /* cms 5차 탭메뉴 */
32        var $addons = $container.find('.addons_item'),
33            $addonsButton = $addons.find('button');
34        
35        $addonsButton.each(function (){
36            $(this).on('click', function(event) {
37            	$(this).parents('li').toggleClass('active');
38            });
39        });
40        
41        // gnb2 3차 메뉴 가지고 있는 li에 클래스 추가
42        $('#depth > ul > li').each(function(i) {
43            if ($(this).find('div').length > 0){
44                $(this).addClass('type1');
45            }
46        });
47        
48        $('#depth > ul > li.type1 > a').on('click', function(){
49    		if($(this).parent().hasClass('active')){
50    			$(this).parent().removeClass('active');
51    		}else{
52    			$(this).parent().addClass('active').siblings().removeClass('active');
53    		}		
54    		return false;
55    	});
56        
57        var lMenuCd = getParam(window.location.href, "mid");
58        if(lMenuCd !== null){
59        	var lMenuCdStr = lMenuCd.substring(2);
60        	const lMenuCdleng = lMenuCdStr.replace(/\B(?=(\d{2})+(?!\d))/g, ',').split(",");
61        	let lMenuCdCon ="";
62        	for (var i in lMenuCdleng){
63        		lMenuCdCon+= lMenuCdleng[i];
64        		$("#li"+lMenuCdCon.padEnd(10,'0')).addClass("active");
65        		$("#tab_li"+lMenuCdCon.padEnd(10,'0')).addClass("active").attr("aria-selected", "true").children("button").attr("title","선택됨");
66        		if(lMenuCdleng[i] === "00") break;
67        	}
68			//$("#tab_li"+lMenuCdStr).children("button").attr("title","선택됨");
69
70			//모바일 메뉴. mid 있을때, 1depth 메뉴에 active처리 신규작업(230915)
71			$("#snb .side_menu > ul > li").each(function(i, item){
72				if(getParam($(item).children("a").attr("href"), "mid") != null){
73					if(lMenuCd.substr(0, 4) == getParam($(item).children("a").attr("href"), "mid").substr(0,4)){
74						$(item).addClass("active");
75						return false;
76					}    
77				}
78			})
79        }
80		//웹접근성 본문바로가기시 동작
81		/*
82		$("#main_con").one("focusin",function(){
83			$("html").animate({scrollTop : 0}, 200);
84		});
85		*/
86    });
87})(window.jQuery); 
88
89//<![CDATA[
90function find_chk() {
91	var n = 0;
92	var str = $("#f_search").val();
93	if (str == "") return false;
94	
95    if(navigator.userAgent.indexOf("rv:11") > -1) {
96        var f, contents = document.body.createTextRange();
97        for(var i = 0; i <= n && (f = contents.findText(str)) != false; i++) {
98            contents.moveStart('character');
99            contents.moveEnd('textedit');
100        }
101        if(f) {
102            contents.moveStart('character', -1);
103            contents.findText(str);
104            contents.select();
105            n++;
106        }
107    } else {
108    	if (!window.find(str))
109   		while(window.find(str, true)) n++;
110   		else n++;
111   		if (n == 0) alert("해당 문자열을 찾을 수 없습니다!");
112    }
113	return false;
114}
115
116function find_kechk() {
117	if (event.keyCode == 13) {
118		find_chk();
119	}
120}
121
122function printPage(){
123	var initBody;
124	window.onbeforeprint = function(){
125	initBody = document.body.innerHTML;
126	document.body.innerHTML =  document.getElementById("contents").innerHTML;
127	};
128	window.onafterprint = function(){
129	document.body.innerHTML = initBody;
130	};
131	window.print();
132	return false;
133	}
134//]]>
135
136//table pc화면 에서도 가로 터치스와이프 가능 추가
137
138document.addEventListener('DOMContentLoaded', function () {
139    const areas = document.querySelectorAll(
140        '.mobileArea.full, .mobileArea.big, .mobileArea.wide'
141    );
142
143    areas.forEach(area => {
144        let isDown = false;
145        let startX;
146        let scrollLeft;
147
148        area.addEventListener('mousedown', (e) => {
149            isDown = true;
150            startX = e.pageX - area.offsetLeft;
151            scrollLeft = area.scrollLeft;
152            area.classList.add('dragging');
153        });
154
155        area.addEventListener('mouseleave', () => {
156            isDown = false;
157            area.classList.remove('dragging');
158        });
159
160        area.addEventListener('mouseup', () => {
161            isDown = false;
162            area.classList.remove('dragging');
163        });
164
165        area.addEventListener('mousemove', (e) => {
166            if (!isDown) return;
167            e.preventDefault();
168            const x = e.pageX - area.offsetLeft;
169            const walk = (x - startX) * 1.5;
170            area.scrollLeft = scrollLeft - walk;
171        });
172    });
173});
174

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.