mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-23 05:09:56 +09:00
Issue 2443. GNB UI enhancement.
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11612 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
b8eb83cd94
commit
747bf20f46
5 changed files with 952 additions and 72 deletions
|
|
@ -42,28 +42,9 @@ jQuery(function($){
|
|||
});
|
||||
// GNB Height 100%
|
||||
var $xBody = $('.x>.body');
|
||||
var $xContent = $xBody.find('>.content');
|
||||
var $xContent = $xBody.children('#content.content');
|
||||
var $xGnb = $xBody.find('>.gnb');
|
||||
var $xGnb_li = $xGnb.find('>ul>li');
|
||||
$(window).resize(function(){
|
||||
setTimeout(function(){
|
||||
if($(window).width() <= 980 || $(window).width() > 1240){
|
||||
$xBody.removeClass('wide');
|
||||
} else {
|
||||
$xBody.addClass('wide');
|
||||
}
|
||||
}, 100);
|
||||
}).resize();
|
||||
// GNB Click toggle
|
||||
$xGnb_li.find('ul').prev('a')
|
||||
.bind('click focus', function(){
|
||||
var $this = $(this);
|
||||
// Submenu toggle
|
||||
$xGnb_li.not($this.parent('li')).removeClass('open');
|
||||
$(this).parent('li').toggleClass('open');
|
||||
$xGnb.trigger('mouseenter'); // GNB Hover
|
||||
return false;
|
||||
});
|
||||
// GNB Hover toggle
|
||||
function contentBugFix(){ // Chrome browser rendering bug fix
|
||||
$xContent.width('99.99%');
|
||||
|
|
@ -71,22 +52,22 @@ jQuery(function($){
|
|||
$xContent.removeAttr('style');
|
||||
}, 0);
|
||||
}
|
||||
$xGnb
|
||||
.mouseenter(function(){ // Mouseenter
|
||||
if($(window).width() >= 980){
|
||||
$xBody.removeClass('wide');
|
||||
contentBugFix();
|
||||
}
|
||||
})
|
||||
.mouseleave(function(){ // Mouseleave
|
||||
if($(window).width() >= 980 && $(window).width() < 1240){
|
||||
$xBody.addClass('wide');
|
||||
contentBugFix();
|
||||
}
|
||||
// GNB Click toggle
|
||||
$xGnb_li.find('ul').prev('a')
|
||||
.bind('click focus', function(){
|
||||
var $this = $(this);
|
||||
// Submenu toggle
|
||||
$xGnb_li.not($this.parent('li')).removeClass('open');
|
||||
$(this).parent('li').toggleClass('open');
|
||||
$xBody.removeClass('wide');
|
||||
contentBugFix();
|
||||
return false;
|
||||
});
|
||||
// GNB Mobile Toggle
|
||||
$xGnb.find('>a[href="#gnbNav"]').click(function(){
|
||||
$(this).parent('.gnb').toggleClass('open');
|
||||
$xBody.toggleClass('wide');
|
||||
contentBugFix();
|
||||
return false;
|
||||
});
|
||||
// GNB Close
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue