mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-12 07:11:42 +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
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue