1$(document).ready(function () { 2 //---------------------------------- 3 //ì¤í ì¤ë¸ì í¸ ëª©ë¡ 4 //---------------------------------- 5 App.mGnb.init({ 6 mGnbType: 'depthOnSide', //모ë°ì¼ë©ë´ ì í allDepthVertical, depthOnSide, depthOnSideFixed 7 //mGnbWrap: '.slideMenu', //<nav>ì í´ëì¤ 8 //mGnbBox: '.m-gnb', //gnb mobile ulì ê°ì¸ë divì í´ëì¤ 9 //openGnb: 'on', //gnb ì¤í ì <nav>ì ë¶ë í´ëì¤ 10 //depth1: 'dep1', //gnb 1ëì¤ ulì í´ëì¤ 11 //depth2: 'dep2', //gnb 2ëì¤ ulì í´ëì¤ 12 //depth3: 'dep3', //gnb 3ëì¤ ulì í´ëì¤ 13 mBtnOpen: '.btn-m-menu', //모ë°ì¼ gnb를 ì´ë¦¼ ë²í¼ 14 //mBtnClose: '.slide-close', //모ë°ì¼ gnb ë«ê¸° ë²í¼ 15 //mGnbBg: '.m-gnb-bg', //모ë°ì¼ gnb ë°°ê²½ í´ëì¤ 16 //mUtil: '.m-util', //모ë°ì¼ gnbë´ utility ìì(ì: home, login, sitemap ë±) 17 //setCurrent: 'current', //íì¬ íì´ì§ íìí í´ëì¤ 18 //setActive: 'active', //ë©ë´ ì´ë¦´ ì íìí í´ëì¤ 19 //setCollapse: 'has-dep', //íì ë©ë´ê° ìì ì ë©ë´ì ë¶ë í´ëì¤ 20 //setFixed: 'all-fixed', //gnb ì¤í ì bodyì ë¶ë í´ëì¤(ë°°ê²½ ì¤í¬ë¡¤ ë§ê¸° ìí í´ëì¤) 21 //mGnbWidth: '100%', //모ë°ì¼ë©ë´ í 22 mGnbDirection: 'left', //모ë°ì¼ë©ë´ ì¬ë¼ì´ë ëë ì ì¼ìª½ìì ììíë©´ left, ì¤ë¥¸ìª½ìì ììíë©´ right 23 activateLater: function() { 24 // User-defined functions 25 $('.btn-m-menu').on('click', function() { 26 if($('body').hasClass('srch-open')){ 27 $('.srch-wrap').removeClass('on'); 28 $('body').removeClass('srch-open'); 29 } 30 }); 31 }, 32 }); 33}); 34//====================================================================== 35//mobile Gnb 36//====================================================================== 37App.mGnb = function () { 38 var self; 39 var settings; 40 var $mGnbType, $mGnbWrap, $mGnbBox, openGnb, depth1, depth2, depth3, $mBtnOpen, $mBtnClose, $mGnbBg, $mUtil, setCurrent, setActive, setCollapse, setFixed, hideClass; 41 var $mGnbWidth, $mGnbDirection; 42 return { 43 init: function(opt) { 44 self = this; 45 // 기본 ìµì ì ì 46 settings = $.extend({ 47 mGnbWrap: '.slideMenu', 48 mGnbBox: '.m-gnb', 49 openGnb: 'on', 50 depth1: 'dep1', 51 depth2: 'dep2', 52 depth3: 'dep3', 53 mBtnOpen: '.btn-menu', 54 mBtnClose: '.slide-close', 55 mGnbBg: '.m-gnb-bg', 56 mUtil: '.m-util', 57 setCurrent: 'current', 58 setActive: 'active', 59 setCollapse: 'has-dep', 60 setFixed: 'all-fixed', 61 hideClass: 'gnb-hide', 62 mGnbWidth: '100%', //모ë°ì¼ë©ë´ í 63 mGnbDirection: 'right', //모ë°ì¼ë©ë´ ì¬ë¼ì´ë ëë ì ì¼ìª½ìì ììíë©´ left, ì¤ë¥¸ìª½ìì ììíë©´ right 64 }, opt); 65 66 $mGnbType = settings.mGnbType; 67 $mGnbWrap = $(settings.mGnbWrap); 68 $mGnbBox = $(settings.mGnbBox); 69 openGnb = settings.openGnb; 70 depth1 = settings.depth1; 71 depth2 = settings.depth2; 72 depth3 = settings.depth3; 73 $mBtnOpen = $(settings.mBtnOpen); 74 $mBtnClose = $(settings.mBtnClose); 75 $mGnbBg = $(settings.mGnbBg); 76 $mUtil = $(settings.mUtil); 77 setCurrent = settings.setCurrent; 78 setActive = settings.setActive; 79 setCollapse = settings.setCollapse; 80 setFixed = settings.setFixed; 81 hideClass = settings.hideClass; 82 $mGnbWidth = settings.mGnbWidth; 83 $mGnbDirection = settings.mGnbDirection; 84 85 $('body').addClass($mGnbType); //bodyì íì í´ëì¤ ì¶ê° 86 87 self.mGnbSet(opt); //모ë°ì¼ë©ë´ 기본 setting 88 89 $mBtnOpen.click(function(e) { //모ë°ì¼ë©ë´ ì´ê¸° ë²í¼ í´ë¦ ì 90 e.preventDefault(); 91 self.slideMenuOpen(opt); //모ë°ì¼ë©ë´ ì´ê¸° 92 }); 93 94 $mBtnClose.click(function (e) { //모ë°ì¼ë©ë´ ë«ê¸° ë²í¼ í´ë¦ ì 95 e.preventDefault(); 96 self.slideMenuClose(opt); //모ë°ì¼ë©ë´ ë«ê¸° 97 }); 98 99 //ê²ìí ì¬ì´í¸ ë´ common.jsì ì ì©ë ìì¤ì ì¤ë³µëì´ ì£¼ìì²ë¦¬ (2023.07.31) 100 /*self.mGnbDepthToggle(opt); //íìëì¤ë³ ì¬ë¼ì´ë í ê¸*/ 101 102 103 //$mGnbWrap.css({'width': $mGnbWidth}); //모ë°ì¼ë©ë´ í 104 $mGnbWrap.addClass($mGnbDirection); //모ë°ì¼ë©ë´ ì¬ë¼ì´ë ëë ì 105 106 if(opt.activateLater) { //ì¬ì©ì ì ì í¨ì ì¤í 107 opt.activateLater(); 108 } 109 }, 110 mGnbSet: function(opt) { //모ë°ì¼ë©ë´ 기본 setting 111 //1ëì¤ ë©ë´ì hide í´ëì¤ë¡ ì¨ê¹ì²ë¦¬ ë ë©ë´ë¥¼ ììììë ì¨ê¹íëë¡ ë¦¬ì¤í¸ ìì 112 $mGnbBox.find('.' + depth1 + ' > li').each(function() { 113 if($(this).find('.' + hideClass).length > 0) { 114 $(this).remove(); 115 } 116 }); 117 //ììììê° ìë 리ì¤í¸ì has-depì´ë¼ë í´ëì¤ ì¶ê° 118 $mGnbBox.find('ul').each(function() { 119 $(this).parent('li').addClass(setCollapse); 120 }); 121
122 // íì¬ íì´ì§ íì±í ë©ë´ íì 기ë¥ì´ ì¤ë³µëì´ ì£¼ìì²ë¦¬ (2023.07.31) 123 /*$mGnbBox.find('a').each(function() { 124 //var menuCd = 'mobile-menu-' + CMS.menuCd; 125 var menuCd = 'mobile-menu-' + _thisHost._cur_menu_cd; 126 if($(this).attr('id') === menuCd) $(this).parent('li').addClass(setCurrent); 127 });*/ 128 129 //íì¬ íì´ì§ ìì ë©ë´ ì¤í 130 $mGnbBox.find('.' + setActive).parentsUntil($mGnbWrap, 'li').addClass(setActive); 131 $mGnbBox.find('li.' + setActive + ' > ul').each(function() { 132 $(this).show(); 133 }); 134 }, 135 slideMenuOpen: function(opt) { //모ë°ì¼ë©ë´ ì´ê¸° 136 //ì´ê¸°/ë«ê¸° 137 $mGnbWrap.addClass(openGnb); 138 $mGnbBg.show(); 139 $mBtnClose.show(); 140 $('html, body').addClass(setFixed); 141 142 if($mGnbType == 'depthOnSide' && $('body').hasClass('main') || $mGnbType == 'depthOnSideFixed' && $('body').hasClass('main')) { //모ë°ì¼ë©ë´ê° 1depthOnSide, 1depthOnSideFixedì¼ ë 143 $('.' + depth1 + ' > li:first-of-type > a').trigger('click'); 144 } 145 $mGnbBox.find('li.' + setActive + ' > ul').each(function() { // 모ë°ì¼ ë©ë´ 2ëì¤ ë ¸ì¶ : pc -> mobile 리ì¬ì´ì¦ ëì 146 $(this).show(); 147 }); 148 if($mGnbType == 'depthOnSideFixed') { //모ë°ì¼ë©ë´ê° depthOnSideFixedì¼ ë 149 self.setHeight(opt); 150 } 151 $(window).resize(function(){ 152 if($(window).width() > 1024){ 153 $mGnbWrap.removeClass(openGnb); 154 $mGnbBg.hide(); 155 $mBtnClose.hide(); 156 $('html, body').removeClass(setFixed) 157 } 158 }); 159 }, 160 slideMenuClose: function(opt) { //모ë°ì¼ë©ë´ ë«ê¸° 161 $mGnbWrap.removeClass(openGnb); 162 $mGnbBg.hide(); 163 $mBtnClose.hide(); 164 $('html, body').removeClass(setFixed); 165 }, 166 mGnbDepthToggle: function(opt) { //íìëì¤ë³ ì¬ë¼ì´ë toggle 167 168 //모ë°ì¼ ë©ë´ ì ì´ 169 var thisMenu; 170 171 if($mGnbType == 'allDepthVertical') { //모ë°ì¼ë©ë´ê° allDepthVerticalì¼ ë 172 $mGnbBox.find('.' + setCollapse).find('a[target!=_blank]').click(function (e) { 173 if($(this).next('ul').length > 0) { 174 e.preventDefault(); 175 thisMenu = $(this); 176 toggleMenu(); 177 } 178 }); 179 } else if($mGnbType == 'depthOnSide' || $mGnbType == 'depthOnSideFixed') { //모ë°ì¼ë©ë´ê° depthOnSide, depthOnSideFixedì¼ ë 180 $mGnbBox.find('.' + depth1 + ' > .' + setCollapse + ' > a[target!=_blank]').click(function (e) { //1ëì¤ ë©ë´ í´ë¦ì 181 if($(this).next('ul').length > 0) { 182 e.preventDefault(); 183 $(this).next('ul').stop(true).show().parent('li').toggleClass(setActive); 184 $(this).parent('li').siblings().removeClass(setCurrent).removeClass(setActive).children('ul').stop(true).hide(); 185 } 186 }); 187 $mGnbBox.find('.' + depth2 + ' .' + setCollapse + ' a[target!=_blank]').click(function (e) { //2ëì¤ ì´í ë©ë´ í´ë¦ì 188 if($(this).next('ul').length > 0) { 189 e.preventDefault(); 190 thisMenu = $(this); 191 toggleMenu(); 192 } 193 }); 194 } 195 196 function toggleMenu() { 197 thisMenu.next('ul').stop(true).slideToggle('fast').parent('li').toggleClass(setActive); 198 thisMenu.parent('li').siblings().removeClass(setActive).children('ul').stop(true).slideUp('fast'); 199 } 200 }, 201 setHeight: function(opt) { 202 var topUtilH = $($mUtil).outerHeight();// 1ëì¤ ê³ ì ë° ëì´ ì¸ì 203 //$mGnbBox.css({'top': topUtilH + 'px'}); 204 $mGnbBox.css({'height':'calc(100% - ' + topUtilH + 'px'}); 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.