PageSourceSearch

http://www.korefi.or.kr/css/js/menu.js

js korefi.or.kr collected 2026-10-05 07:02:01 UTC 3,438 bytes, 112 lines download raw bytes

1
2/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3
4/* 좌측 펼침메뉴 3depth 가능 */
5
6(function($) {
7
8	/*********************** 온로드 실행 함수 ***********************/
9	$(function() {
10		/* ie6 png 이미지처리*/
11		if($.browser.className=="msie6"){
12			DD_belatedPNG.fix('.png');
13		}
14
15		explicitLabel("label-wrap");
16
17		/* LNB */
18		$lnb = $(".lnb");
19		
20		//lnb 초기설정
21		$lnb.find("ul").hide();
22		$lnb.find("li.on").parent("ul").show();
23		$lnb.find(">ul>li").each(function(){
24			if($(this).find("ul").length) $(this).find(">a").addClass("sub");
25		});
26
27		//현재페이지 스타일 변경
28		$lnb_thispage = $lnb.find(".on");
29		$lnb_thispage.find(">a img").attr("src", function(){return $(this).attr("src").replace("_off","_on")});
30
31		//1차카테고리 클릭이벤트
32		$lnb.find("h3:not(.on)").bind("click",function(){
33			if($(this).find(">a").attr("href")!="#none"){
34				return true;
35			}
36			else{
37				$lnb
38					.find("h3:not(.on)")
39						.removeClass("active")
40						.removeClass("hover")
41						.next("ul").slideUp()
42						.end()
43					.find("img").attr("src", function(){return $(this).attr("src").replace("_on","_off")});
44
45				if($(this).next("ul:visible").length){
46					$(this).next("ul").slideUp();
47					$(this).find("img").attr("src", function(){return $(this).attr("src").replace("_on","_off")});
48					$(this).removeClass("active");
49				}
50				else{
51					$(this).next("ul").slideDown();
52					$(this).find("img").attr("src", function(){return $(this).attr("src").replace("_off","_on")});
53					$(this).addClass("active");
54				}
55			}
56		});
57
58		//2차카테고리 클릭이벤트
59		$lnb.find(">ul>li:not(.on)>a").bind("click",function(){
60			if($(this).attr("href")!="#none"){
61				return true;
62			}else{
63				$lnb.find("ul>li:not(.on)").find("ul").slideUp();
64				if($(this).parent().find("ul:visible").length) $(this).find("ul").slideUp();
65				else  $(this).parent().find("ul").slideDown();
66				return false;
67			}
68		});
69
70		//이미지오버설정
71		$lnb.find("h3").bind("focus mouseover",function(){
72			$(this).find("img").attr("src", function(){return $(this).attr("src").replace("_off","_on")});
73			$(this).addClass("hover");
74		});
75
76		$lnb.find("h3:not(.on)").bind("blur mouseout",function(){
77			if(!$(this).hasClass("active")){
78				$(this).find("img").attr("src", function(){return $(this).attr("src").replace("_on","_off")});
79			}
80			$(this).removeClass("hover");
81		});
82
83		$lnb.find("ul li:not(.on) a").hover(function(){
84			$(this).addClass('hover');
85			$(this).find("img").attr("src", function(){return $(this).attr("src").replace("_off","_on")});
86		},function(){
87			$(this).removeClass('hover');
88			$(this).find("img").attr("src", function(){return $(this).attr("src").replace("_on","_off")});
89		});
90	});
91
92})(jQuery);
93
94// 암시적 레이블 방식 명시적으로 적용
95function explicitLabel(cssName, margin) {
96	$('.'+cssName+" label").each(function(){
97		$(this).css('padding-left', function() {return $(this).next().outerWidth(true)});
98		$("#"+$(this).attr("for")).css({
99			'margin-left' : function() {
100				return -$(this).prev().outerWidth(true)
101			},
102			'margin-right' : function() {
103				if (margin) {
104					return $(this).prev().width() + margin;
105				} else {
106					return $(this).prev().width()+15;
107				}
108			}
109		});
110	});
111
112}

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.