From 1af83bf89af04a2f334fb8a8fb402a54da758cff Mon Sep 17 00:00:00 2001 From: dlehdanakf Date: Mon, 6 Jul 2015 11:24:43 +0900 Subject: [PATCH] =?UTF-8?q?gnb.pc.js=20=EC=99=80=20gnb.mobile.js=20?= =?UTF-8?q?=EB=AA=A8=EB=91=90=20layout.js=20=EB=A1=9C=20=ED=86=B5=ED=95=A9?= =?UTF-8?q?.=20html=EC=97=90=EC=84=9C=20=ED=95=B4=EB=8B=B9=20js=EB=A1=9C?= =?UTF-8?q?=EB=93=9C=EB=90=98=EB=8A=94=20=EB=B6=80=EB=B6=84=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0=20=EB=B0=8F=20=EC=8A=AC=EB=9D=BC=EC=9D=B4=EB=93=9C?= =?UTF-8?q?=EC=97=90=EC=84=9C=20=EC=A2=8C=EC=9A=B0=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?IE8=EB=8C=80=EC=9D=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layouts/xedition/css/layout.css | 2 +- layouts/xedition/js/gnb.mobile.js | 14 ------------ layouts/xedition/js/gnb.pc.js | 36 ----------------------------- layouts/xedition/js/layout.js | 38 +++++++++++++++++++++++++++++++ layouts/xedition/layout.html | 2 -- 5 files changed, 39 insertions(+), 53 deletions(-) delete mode 100644 layouts/xedition/js/gnb.mobile.js delete mode 100644 layouts/xedition/js/gnb.pc.js diff --git a/layouts/xedition/css/layout.css b/layouts/xedition/css/layout.css index 8f6332573..cc8b9c414 100644 --- a/layouts/xedition/css/layout.css +++ b/layouts/xedition/css/layout.css @@ -222,7 +222,7 @@ a:hover,a:active,a:focus{text-decoration:none} .swiper-button.left { left:20px; } .swiper-button.right { right:20px; } .swiper-button i { width:50px; line-height:50px; text-align:center; font-size:24px; color:#fff; } -.swiper-button button { background:rgba(0,0,0,0.3); cursor:pointer; } +.swiper-button button { background-color:#333; border-radius:50px; background-color:rgba(0,0,0,0.2); cursor:pointer; } .pagination { position: absolute; left: 0; diff --git a/layouts/xedition/js/gnb.mobile.js b/layouts/xedition/js/gnb.mobile.js deleted file mode 100644 index 8888c459d..000000000 --- a/layouts/xedition/js/gnb.mobile.js +++ /dev/null @@ -1,14 +0,0 @@ -(function($) { - $(function(){ - var $gnb = $('.gnb'); - $("#mobile_menu_btn").on('click', function(){ - var isOpened = $(this); - if(isOpened.hasClass('opened')){ - $("#gnb").find(">ul").slideUp(200); - }else{ - $("#gnb").find(">ul:not(:animated)").slideDown(200); - } - isOpened.toggleClass('opened'); - }); - }); -})(jQuery); diff --git a/layouts/xedition/js/gnb.pc.js b/layouts/xedition/js/gnb.pc.js deleted file mode 100644 index 268220412..000000000 --- a/layouts/xedition/js/gnb.pc.js +++ /dev/null @@ -1,36 +0,0 @@ - (function($){ - $(function(){ - var $shrinkHeaderHeight = 300; - var $fixedHeader = $('.fixed_header .header_wrap'); - var $gnb = $('.gnb'); - var $hoverEl = $('.hover'); - var $searchEl = $('.click > a'); - var $searchForm = $('.search_area'); - // Gnb - $gnb.find('>ul>li>a') - .mouseover(function(){ - $gnb.find('>ul>li>ul:visible').hide().parent('li').removeClass('on'); - $(this).next('ul:hidden').stop().fadeIn(200).parent('li').addClass('on') - }) - .focus(function(){ - $(this).mouseover(); - }) - .end() - .mouseleave(function(){ - $gnb.find('>ul>li>ul').hide().parent().removeClass('on') - }); - - $gnb.find('>ul>li>ul>li>a') - .mouseover(function(){ - $gnb.find('>ul>li>ul>li>ul:visible').hide().parent('li').removeClass('on'); - $(this).next('ul:hidden').stop().fadeIn(200).parent('li').addClass('on') - }) - .focus(function(){ - $(this).mouseover(); - }) - .end() - .mouseleave(function(){ - $gnb.find('>ul>li>ul>li>ul').hide().parent().removeClass('on') - }); - }); -})(jQuery); diff --git a/layouts/xedition/js/layout.js b/layouts/xedition/js/layout.js index 6e029563e..b52087088 100644 --- a/layouts/xedition/js/layout.js +++ b/layouts/xedition/js/layout.js @@ -38,6 +38,44 @@ }); $(window).triggerHandler('scroll'); } + // Gnb + if($(document).width() > 480){ + $gnb.find('>ul>li>a') + .mouseover(function(){ + $gnb.find('>ul>li>ul:visible').hide().parent('li').removeClass('on'); + $(this).next('ul:hidden').stop().fadeIn(200).parent('li').addClass('on') + }) + .focus(function(){ + $(this).mouseover(); + }) + .end() + .mouseleave(function(){ + $gnb.find('>ul>li>ul').hide().parent().removeClass('on') + }); + + $gnb.find('>ul>li>ul>li>a') + .mouseover(function(){ + $gnb.find('>ul>li>ul>li>ul:visible').hide().parent('li').removeClass('on'); + $(this).next('ul:hidden').stop().fadeIn(200).parent('li').addClass('on') + }) + .focus(function(){ + $(this).mouseover(); + }) + .end() + .mouseleave(function(){ + $gnb.find('>ul>li>ul>li>ul').hide().parent().removeClass('on') + }); + } + + $("#mobile_menu_btn").on('click', function(){ + var isOpened = $(this); + if(isOpened.hasClass('opened')){ + $("#gnb").find(">ul").slideUp(200); + }else{ + $("#gnb").find(">ul:not(:animated)").slideDown(200); + } + isOpened.toggleClass('opened'); + }); // login popup $hoverEl.on('mouseenter mouseleave focusin focusout',function(e){ e.preventDefault(); diff --git a/layouts/xedition/layout.html b/layouts/xedition/layout.html index d15228740..c77b2d39d 100644 --- a/layouts/xedition/layout.html +++ b/layouts/xedition/layout.html @@ -155,8 +155,6 @@ - -