PageSourceSearch

https://www.uljin.go.kr/js/02_tour/topmenu.js

js uljin.go.kr collected 2026-10-02 05:50:36 UTC 5,213 bytes, 234 lines download raw bytes

1
2function flowerbar(param,obj,btn,elem){
3	var param = $(param);
4	var obj = param.find(obj);
5	var btn = param.find(btn);
6	var elem = Number(elem.substr(3,2))-1;
7	var n = elem;
8
9	function _current(t,e){
10		if(e == "mouseleave" || e == "focusout"){
11			if(!isNaN(elem) && elem !== -1){
12				elem = n;
13				t = btn.eq(elem);
14
15			}else{
16				obj.stop(true,false).animate({opacity:0},300,"easeInOutCubic",function(){
17					$(this).removeAttr("style");
18
19				});
20
21				return false;
22
23			}
24		}
25
26		var twidth = (e === undefined ? btn.eq(elem).outerWidth() : t.outerWidth());
27
28		var xpos = (e === undefined ? btn.eq(elem).offset().left : t.offset().left);
29
30		xpos = xpos-param.offset().left;
31
32  		obj.stop(true,false).animate({left:xpos,width:twidth},300,"easeInOutCubic");
33
34  		return true;
35  	}
36
37	btn.on("mouseenter focusin",function(event){
38		_current($(this),event.type);
39
40	});
41
42	$("#header").on("mouseleave focusout",function(event){
43		_current($(this),event.type);
44
45	});
46
47
48	if(elem !== -1 && !isNaN(elem)){ 
49		$(document).ready(function(){
50			_current(); 
51			
52		});
53	}
54
55}
56
57// 풀다운
58function gnb(param,obj,btn,wrap,elem,dur,meth,mno){
59	var param = $(param);
60	var btn = param.find(btn);
61	var obj = param.find(obj);
62	var wrap = $(wrap);
63	var elem = elem-1; // jsp 메뉴 코드가 1부터 시작하기 때문에
64	var old_h = 88;
65	var n = elem; 
66
67	var data = false;
68
69	var viewHeight = function viewHeight(){
70		var openHeight = new Array();
71
72		$.each(obj,function(e){
73			openHeight[e] = $(this).parent().find(".item").outerHeight(true)+btn.outerHeight(); 
74
75		});
76		return openHeight;
77	};
78
79		wrap.white = wrap.find(".style");
80		
81		
82		
83
84	var fixedheight = viewHeight();
85
86	function _open(){
87		btn.parent().find(".th2").removeAttr("style");
88		
89		fixedheight = viewHeight();
90		
91		btn.not(elem).removeClass("current").eq(elem).addClass("current");
92		obj.not(elem).hide().eq(elem).show();
93		wrap.stop(true,false).animate({"height":fixedheight[elem]},dur,meth);
94		//item.stop(true,false).animate({"height":fixedheight[elem]-old_h},dur,meth);
95	
96
97		wrap.addClass("action");
98		wrap.white.addClass("action");
99		
100		$(".no_touch").stop(true,true).fadeIn(dur);
101
102		data = true;
103
104		return true;
105	}
106
107	function _close(){
108		btn.removeClass("current");
109		wrap.stop(true,false).animate({"height":old_h},dur,meth);
110		obj.hide();
111		wrap.removeClass("action");
112		wrap.white.removeClass("action");
113		$(".no_touch").stop(true,true).fadeOut(dur);
114
115		data = false;
116
117		return true;
118	}
119
120	
121
122	btn.on("mouseenter focusin",function(){
123		
124		elem = $(this).parent().index();
125		_open();
126
127	});
128	
129	
130	
131	//$("#gnb .th2").last().find(">li>a").last().on("focusout.leave",_in);�
132	
133	$("#gnb .th2").last().find(">li>a").last().on("focusout",function(){
134		
135	_close();
136
137	});
138	
139	
140	
141	//obj.last().find(">li>a").last().on("focusout.leave",_in);
142
143
144	
145	
146	param.find("a").last().on("focusout",function(){
147		_close();
148		
149	});
150	
151	
152
153
154	param.bind("mouseleave",function(){
155		if(data === false){ return false; }
156		_close();
157		//_current(n);
158
159	});
160
161	//_current(n);
162
163}
164
165
166// 모바일
167function gnb_open(param,obj,btn,elem,dur,meth){
168	var param = $(param);
169	var obj = $(obj);
170	var btn = $(btn);
171	var elem = elem-1; // jsp 메뉴 코드가 1부터 시작하기 때문에
172	var n = elem;
173	var w = 224;
174	var data = false;
175
176	var _open = function(){
177		obj.animate({left:-w},dur,meth);
178		$("#shadow_device").stop(true,true).fadeIn(dur/2);
179		$("html,body").css({"overflow":"hidden","height":$(window).height()});
180		param.height($(window).height());
181		param.show().stop(true,true).animate({opacity:1},dur,meth);
182		data = true;
183	};
184
185	var _close = function(){
186		obj.animate({left:0},dur,meth);
187		if(n != elem){
188			param.find(".th1>a").not(elem).removeClass("ov").next().stop(true,true).delay(300).slideUp(150);
189			param.find(".th1>a").eq(elem).addClass("ov").next().stop(true,true).slideDown(300);
190		}
191		$("#shadow_device").stop(true,true).fadeOut(dur/2,function(){
192			$("html,body").removeAttr("style");
193			data = false;
194		});
195		param.hide().stop(true,true).delay(dur).animate({opacity:0}
195,0,meth);
196		
197	};
198 	 
199	btn.bind("click",function(event){
200
201		if(data == false) obj.queue(_open).dequeue();	
202		event.preventDefault();
203		event.stopPropagation();
204		return false;
205	});
206
207	param.find("a").bind("click",function(event){
208		if($("#topmenu:animated").size()) return false;
209		event.stopPropagation();
210		
211	})
212
213	// 터치 아웃 영역
214	$("#shadow_device").unbind().bind("click",function(event){
215		obj.queue(_close).dequeue();
216		event.preventDefault();
217		event.stopPropagation();
218	});
219
220
221	// 트리메뉴 컨트롤
222	param.find(".th1>a").not(elem).next().hide().eq(elem).show().prev().addClass("ov");
223	param.find(".th1>a").bind("click",function(event){
224		n = $(this).parent().index();
225		if($(this).next().css("display") == "none"){
226			param.find(".th1>a").not(n).removeClass("ov").next().stop(true,true).delay(300).slideUp(150);
227			param.find(".th1>a").eq(n).addClass("ov").next().stop(true,true).slideDown(300);
228		}
229		event.preventDefault();
230		event.stopPropagation();
231	}); 
232
233
234}

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.