1/* ì ì½ë : template_d | 구 ì½ë : ct_type */ 2function gnb(param, obj, btn, wrap, dur, meth) { 3 var param = $(param); 4 var btn = param.find(btn); 5 var obj = param.find(obj); 6 var wrap = $(wrap); 7 var data = false; 8 var prev_elem = -1; 9 var elem; 10 var targetHeight = new Array(); 11 var heightResult = btn.outerHeight(true); 12 13 function gnbHeight() { 14 var result; 15 var heightList = []; 16 var headerHeight = btn.outerHeight(true); 17 obj.each(function(){ 18 heightList.push($(this).outerHeight(true)); 19 }); 20 result = Math.max.apply(null, heightList); 21 param 22 .stop(true, false) 23 .animate( 24 { height: result + headerHeight }, 25 { duration: 300, easing: "swing" } 26 ); 27 obj.height(result); 28 } 29 30 function _open() { 31 if (prev_elem == undefined) prev_elem = elem; 32 33 if (prev_elem != elem) { 34 prev_elem = elem; 35 btn.parent().find(".item").removeAttr("style"); 36 37 btn.not(elem).removeClass("current").eq(elem).addClass("current"); 38 gnbHeight(); 39 param.addClass("open"); 40 $("#top_layout").addClass("on"); 41 } 42 } 43 44 function _close() { 45 prev_elem = -1; 46 47 btn.removeClass("current"); 48 param 49 .stop(true, false) 50 .animate({ height: heightResult }, { duration: 300, easing: "swing" }); 51 param.removeClass("open"); 52 obj.btn.removeClass("on"); 53 $("#top_layout").removeClass("on"); 54 } 55 56 btn.on("mouseover focusin", function () { 57 elem = $(this).parent().index(); 58 _open(); 59 }); 60 61 obj.item = obj.find(".depth2_ul"); 62 obj.btn = obj.find(".depth2_ul>li>a"); 63 64 //2st:S 65 obj 66 .find("a") 67 .last() 68 .on("focusout", function () { 69 _close(); 70 }); 71 72 obj.btn.on("mouseenter focus", function () { 73 var t = $(this); 74 obj.btn.removeClass("on"); 75 t.addClass("on"); 76 t.next().show(); 77 t.find(".depth3_ul").show().addClass("open"); 78 }); 79 //2st:E 80 81 obj.btn.parent().on("mouseleave", function () { 82 $(this).children().removeClass("on"); 83 }); 84 85 obj 86 .find("a") 87 .last() 88 .on("focusout", function () { 89 _close(); 90 btn.removeClass("current"); 91 }); 92 93 wrap.on("mouseleave", function () { 94 _close(); 95 }); 96} 97 98function gnb_open() { 99 var param = $("#mobile-menu"); 100 var str = location.href; 101 var n = 0; 102 var dur = 300; 103 var meth = "easeOutExpo"; 104 105 param.find(".depth2_ul").hide(); 106 /* 107 param.find(".depth1_ul > .n1 .depth2_ul").show(); 108 param.find(".depth1_ul > .n1 > a").addClass("ov"); 109 */ 110 param.find(".depth1_ul a.ov").next("ul").show(); 111 112 param.find("a").on("click", function (event) { 113 if (param.is(":animated") && param.find(":animated").size()) { 114 return false; 115 } 116 }); 117 118 function hideMenu() { 119 param.find(".collapse").hide().removeClass("ov"); 120 } 121 param.find(".depth1_ul>li>a").on("click", function (event) { 122 n = $(this).parent().index(); 123 if ($(this).next().attr("class").match("depth2_ul")) { 124 if ($(this).next().css("display") == "none") { 125 param 126 .find(".depth1_ul>li>a") 127 .not(n) 128 .removeClass("ov") 129 .next() 130 .stop(true, true) 131 .delay(150) 132 .slideUp(150); 133 param 134 .find(".depth1_ul>li>a") 135 .eq(n) 136 .addClass("ov") 137 .next() 138 .stop(true, true) 139 .slideDown(150); 140 } 141 } 142 event.preventDefault(); 143 }); 144 145 param.find(".depth2_ul>li>a").on("click", function (event) { 146 var t = $(this); 147 148 if (t.next().attr("class").match("depth3_ul")) { 149 if (t.next().css("display") != "block") { 150 t.addClass("ov"); 151 t.next().slideDown(150); 152 } else { 153 t.removeClass("ov"); 154 t.next().slideUp(150); 155 } 156 157 event.preventDefault(); 158 } 159 }); 160 161 $(window).on("resize", function () { 162 $(".mobile-close").click(); 163 $("#gnb_layout").removeAttr("style"); 164 }); 165} 166$("#mobile-menu .depth3_ul").prev().addClass("dep");
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.