mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-03 18:42:10 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11211 201d5d3c-b55e-5fd7-737f-ddc643e51545
57 lines
No EOL
1.5 KiB
JavaScript
57 lines
No EOL
1.5 KiB
JavaScript
/* NHN (developers@xpressengine.com) */
|
|
jQuery(function($){
|
|
// iSO mobile device toolbar remove
|
|
window.top.scrollTo(0,0);
|
|
// Skip to content
|
|
$('.x .skipNav>a').click(function(){
|
|
$($(this).attr('href')).attr('tabindex','0').css('outline','0').focus();
|
|
});
|
|
// Content Toggle
|
|
$('.x [data-toggle^="#"]').click(function(){
|
|
$($(this).attr('data-toggle')).toggle();
|
|
return false;
|
|
});
|
|
// GNB Click
|
|
var $xBody = $('.x>.body');
|
|
var $xContent = $xBody.find('>.content');
|
|
var $xGnb = $xBody.find('>.gnb');
|
|
$xGnb.find('>ul>li>a').click(function(){
|
|
var $xGnbReady = $xGnb.hasClass('ready');
|
|
var $this = $(this);
|
|
var $li = $xGnb.find('>ul>li');
|
|
if($xGnbReady && $this.next('ul').length==1){
|
|
$li.not($this.parent('li')).removeClass('open');
|
|
$this.parent('li').toggleClass('open');
|
|
return false;
|
|
} else if(!$xGnbReady && $this.next('ul').length==1){
|
|
return false;
|
|
}
|
|
if($this.attr('href')=='#gnb' && !$this.parent('li').hasClass('open')){
|
|
$li.addClass('open');
|
|
$xGnb.removeClass('ready');
|
|
} else {
|
|
$li.removeClass('open');
|
|
$xGnb.addClass('ready');
|
|
}
|
|
});
|
|
// GNB Hover
|
|
function contentBugFix(){
|
|
$xContent.width('99.99%');
|
|
setTimeout(function(){
|
|
$xContent.removeAttr('style');
|
|
}, 0);
|
|
}
|
|
$xGnb
|
|
.bind('mouseenter', function(){
|
|
if($xGnb.hasClass('ready')){
|
|
$xBody.removeClass('wide');
|
|
contentBugFix();
|
|
}
|
|
})
|
|
.bind('mouseleave', function(){
|
|
if($xGnb.hasClass('ready')){
|
|
$xBody.addClass('wide');
|
|
contentBugFix();
|
|
}
|
|
})
|
|
}); |