mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
gnb.pc.js 와 gnb.mobile.js 모두 layout.js 로 통합. html에서 해당 js로드되는 부분 제거 및 슬라이드에서 좌우 버튼 IE8대응
This commit is contained in:
parent
d6bcd43964
commit
1af83bf89a
5 changed files with 39 additions and 53 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
@ -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);
|
||||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -155,8 +155,6 @@
|
|||
|
||||
<load cond="$_enable_slide" target="./js/idangerous.swiper.min.js" />
|
||||
<load target="./js/layout.js" />
|
||||
<load target="./js/gnb.pc.js" cond="!Mobile::isMobileCheckByAgent()" />
|
||||
<load target="./js/gnb.mobile.js" cond="Mobile::isMobileCheckByAgent()" />
|
||||
<load cond="$layout_info->use_demo ==='Y' && !Mobile::isMobileCheckByAgent()" target="./js/welcome.js" />
|
||||
<load target="./js/jquery.parallax-scroll.min.js" />
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue