1if (typeof (jQuery) != 'undefined') { 2 //GNB 3 function SetTopGnb(param, ban, obj, btn, wrap, elem, scale, dur, meth) { 4 var param = $(param); 5 var ban = param.find(ban); 6 var obj = param.find(obj); 7 var btn = param.find(btn); 8 var wrap = param.find(wrap); 9 var elem = elem - 1; 10 var old_h = 66; 11 var n = elem; 12 13 var openHeight = [210, 210, 66, 66, 244, 66]; 14 //var openHeight = [176, 66, 210, 66, 66, 244, 66]; 15 //var openHeight = [176, 66, 210, 66, 244, 66]; 16 17 18 ban.hide(); 19 obj.hide(); 20 21 function _open() { 22 btn.not(elem).removeClass("current").eq(elem).addClass("current"); 23 ban.not(elem).hide().eq(elem).show(); 24 obj.not(elem).hide().eq(elem).show(); 25 wrap.stop(true, false).animate({ "height": openHeight[elem] }, dur, meth); 26 } 27 28 function _close() { 29 btn.removeClass("current"); 30 obj.children().find("a").removeClass("on"); 31 obj.children().find("ul").removeClass("on"); 32 wrap.stop(true, false).animate({ "height": old_h }, dur, meth, function () { obj.hide(); }); 33 } 34 35 // í ë¸ë¦¿ í°ì¹ í¨ë¤ë§ 36 btn.bind("touchstart click", function (event) { 37 elem = $(this).parent().index(); 38 _open(); 39 //event.preventDefault(); 40 event.stopPropagation(); 41 //return false; 42 }); 43 44 btn.bind("click", function (e) { 45 /* 46 if (Modernizr.touch) { 47 e.preventDefault(); 48 e.stopPropagation(); 49 }*/ 50 51 }); 52 53 btn.bind("mouseenter focusin", function (event) { 54 elem = $(this).parent().index(); 55 _open(); 56 event.stopPropagation(); 57 }); 58 59 param.bind("mouseleave", function () { 60 _close(); 61 }); 62 63 obj.last().find(">li>ul>li>a").last().bind("focusout", function () { 64 _close(); 65 }); 66 67 obj.children().find("ul>li>a:last").bind("focusout", function () { 68 $(this).parents("ul").removeClass("on"); 69 }); 70 71 obj.children().bind("mouseenter", function (event) { 72 obj.children().find("a").removeClass("on"); 73 obj.children().find("ul").removeClass("on"); 74 $(this).children().addClass("on"); 75 event.stopPropagation(); 76 }).find("a").bind("focusin", function (event) { 77 obj.children().find("a").removeClass("on"); 78 $(this).next("ul").addClass("on"); 79 $(this).parents("ul").prev().addClass("on"); 80 event.stopPropagation(); 81 }); 82 } 83 84 // 모ë°ì¼ ë©ë´ ê´ë ¨ ì¤í¬ë¦½í¸ 85 function mobile_menu() { 86 var depth1 = $(".m_menu"), 87 depth2 = depth1.find(".depth_02"), 88 dep1_length = depth1.find(" > li").length, 89 depLast_length = depth1.find(" > li:nth-child(" + dep1_length + ") li").length; 90 91 depth1.find(" > li > div").addClass('top2m'); 92 depth1.off(); 93 depth1.find(" > li > a").off(); 94 depth1.find(" ul > li a").off(); 95 96 $(".m_menu .top2m, .m_menu .top2m div").css("height", "auto"); 97 98 99 depth1.find(" > li > a").on('click', function (event) { 100 if ($(this).next().next("ul.depth_02").find(">li").length > 0) { 101 event.preventDefault(); 102 var m_open = $(this).hasClass('active'); 103 if (m_open == true) { 104 $(this).siblings().slideUp(); 105 $(this).removeClass('active'); 106 } else { 107 depth1.find(" > li > ul ").stop().slideUp(); 108 depth1.find(" > li > ul > li > a").removeClass('on'); 109 110 depth1.find(" a ").removeClass('active'); 111 $(this).addClass('active') 112 $(this).siblings('.depth_02').slideDown(); 113 } 114 } 115 }); 116 depth2.find(" > li > a").on('click', function (event) { 117 if ($(this).next("ul").length > 0) { 118 event.preventDefault(); 119 120 var m_open = $(this).hasClass('on'); 121 if (m_open == true) { 122 $(this).siblings().slideUp(); 123 $(this).removeClass('on'); 124 } else { 125 depth2.find(" > li > ul ").stop().slideUp(); 126 depth2.find(" a ").removeClass('on'); 127 128 $(this).addClass('on') 129 $(this).siblings('ul').slideDown(); 130 } 131 } 132 }); 133 } 134 135 136 $(document).ready(function () { 137 var $ele = $("#depth").clone().find(".depth_02").removeAttr("id", "").end(); 138 $(".m_menu").html($ele.html()); 139 140 var m_gnb = $('#m_gnb'), 141 m_nav_btn = $('.m_gnb_btn button'), 142 btn_state = $('.m_gnb_btn .state'); 143 dim = $('.dim'), 144 bodyFrame = $('body, html'); 145 m_nav_display = false; 146 147 m_nav_btn.click(function () { 148 var h = $(window).height(); 149 if (!m_nav_display) { 150 m_gnb.animate({ right: 0 }, 500); 151 m_gnb.show(); 152 $('#m_gnb').addClass('on'); 153 if ($(window).width() < 640) { 154 $('.m_gnb_btn').animate({ right: 300 }, 500); 155 } else { 156 $('.m_gnb_btn').animate({ right: 300 }, 500); 157 } 158 $('.m_gnb_btn').css({ 'z-index': '120' }); 159 dim.show(); 160 bodyFrame.css('overflow', 'hidden'); 161 btn_state.text(''); 162 m_nav_display = true; 163 } else { 164 m_gnb.animate({ right: -1300 }, 500); 165 $('.m_gnb_btn').animate({ right: 20 }, 500); 166 dim.hide(); 167 bodyFrame.css('overflow', 'visible'); 168 btn_state.text(''); 169 $('.m_menu .depth_01 a').removeClass('active'); 170 $('.m_menu .depth_02').slideUp(); 171 m_nav_display = false; 172 } 173 $(this).toggleClass('open'); 174 }); 175 mobile_menu(); 176 });
177 178 179 180 181 182 $(document).ready(function () { 183 184 185 //left menu Accordion 186 $('.lnb > ul > li > a').click(function (e) { 187 if ($(this).next("ul.lnb_sub").length > 0) { 188 e.preventDefault(); 189 var $this = $(this); 190 if ($this.next().hasClass('open')) { 191 $this.next().removeClass('open'); 192 $this.next().slideUp(350); 193 } else { 194 $this.parent().parent().find('li .lnb_sub').removeClass('open'); 195 $this.parent().parent().find('li .lnb_sub').slideUp(350); 196 $this.next().toggleClass('open'); 197 $this.next().slideToggle(350); 198 } 199 } 200 }); 201 202 }); 203 204 205 206 207}
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.