1jQuery(function(jQuery){ 2 jQuery.fn.gnb = function(options) { 3 var opts = jQuery.extend(options); 4 var gnb = jQuery(this); 5 var gnbList = gnb.find('>ul>li'); 6 var submenu = gnb.find('.submenu'); 7 var submenuList = submenu.find('>ul>li'); 8 var submenuBg = jQuery('.submenu-bg'); 9 10 function showMenu() { 11 t = jQuery(this).parent('li'); 12 if (!t.hasClass('active')) { 13 gnbList.removeClass('active'); 14 t.addClass("active"); 15 16 submenu.hide(); 17 18 if(t.find('div').hasClass('submenu')){ 19 submenuBg.show(); 20 submenuBg.stop(true, false).animate({height:t.find(".submenu").height()},200, 'swing',function(){ 21 t.find(".submenu").show(); 22 }); 23 }else{ 24 submenuBg.stop(true, false).animate({height:'0'},200, 'swing', function(){ 25 submenuBg.hide(); 26 }); 27 }; 28 jQuery("#header").addClass('header-hover'); 29 } 30 31 32 } 33 34 function showMenu2() { 35 t = jQuery(this).parent('li'); 36 if (!t.hasClass('active')) { 37 gnbList.removeClass('active'); 38 t.addClass("active"); 39 40 submenu.hide(); 41 submenuBg.hide(); 42 43 if(t.find('div').hasClass('submenu')){ 44 submenuBg.show(); 45 submenuBg.stop(true, false).animate({height:t.find(".submenu").height()},200, 'swing',function(){ 46 t.find(".submenu").show(); 47 }); 48 }else{ 49 submenuBg.stop(true, false).animate({height:'50'},200, 'swing', function(){ 50 submenuBg.hide(); 51 }); 52 }; 53 jQuery("#header").addClass('header-hover'); 54 } 55 return false; 56 } 57 58 function hideMenu() { 59 gnbList.removeClass('active'); 60 submenu.hide(); 61 submenuBg.stop(true, false).animate({height:'50'},200, 'swing', function(){ 62 submenuBg.hide(); 63 }); 64 jQuery("#header").removeClass('header-hover'); 65 } 66 67 return this.each(function() { 68 var isTablet = navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry|Windows Phone)/); 69 if( !isTablet ){ 70 gnbList.find('>a').mouseover(showMenu).focus(showMenu); 71 }else{ 72 gnbList.find('>a').click(showMenu2); 73 } 74 gnb.mouseleave(hideMenu); 75 }); 76 } 77 $('#gnb').gnb(); 78});
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.