관리자: gnb 아이디 클래스명 수정
This commit is contained in:
@ -40,11 +40,12 @@ $(function(){
|
||||
});
|
||||
|
||||
// 주메뉴
|
||||
var $gnb = $('.gnb_1depth > a');
|
||||
var $gnb = $(".gnb_1dli > a");
|
||||
$gnb.mouseover(function() {
|
||||
if(mouse_event) {
|
||||
$('.gnb_1depth').removeClass('gnb_1depth_over gnb_1depth_on');
|
||||
$(this).parent().addClass('gnb_1depth_over gnb_1depth_on');
|
||||
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
|
||||
$(this).parent().addClass("gnb_1dli_over gnb_1dli_on");
|
||||
menu_rearrange($(this).parent());
|
||||
hide_menu = false;
|
||||
}
|
||||
});
|
||||
@ -53,17 +54,18 @@ $(function(){
|
||||
hide_menu = true;
|
||||
});
|
||||
|
||||
$('.gnb_1depth li').mouseover(function() {
|
||||
$(".gnb_2dli").mouseover(function() {
|
||||
hide_menu = false;
|
||||
});
|
||||
|
||||
$('.gnb_1depth li').mouseout(function() {
|
||||
$(".gnb_2dli").mouseout(function() {
|
||||
hide_menu = true;
|
||||
});
|
||||
|
||||
$gnb.focusin(function() {
|
||||
$('.gnb_1depth').removeClass('gnb_1depth_over gnb_1depth_on');
|
||||
$(this).parent().addClass('gnb_1depth_over gnb_1depth_on');
|
||||
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
|
||||
$(this).parent().addClass("gnb_1dli_over gnb_1dli_on");
|
||||
menu_rearrange($(this).parent());
|
||||
hide_menu = false;
|
||||
});
|
||||
|
||||
@ -71,29 +73,63 @@ $(function(){
|
||||
hide_menu = true;
|
||||
});
|
||||
|
||||
$('.gnb_1depth ul a').focusin(function() {
|
||||
$('.gnb_1depth').removeClass('gnb_1depth_over gnb_1depth_on');
|
||||
var $gnb_li = $(this).closest('.gnb_1depth').addClass('gnb_1depth_over gnb_1depth_on');
|
||||
$(".gnb_2da").focusin(function() {
|
||||
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
|
||||
var $gnb_li = $(this).closest(".gnb_1dli").addClass("gnb_1dli_over gnb_1dli_on");
|
||||
menu_rearrange($(this).closest(".gnb_1dli"));
|
||||
hide_menu = false;
|
||||
});
|
||||
|
||||
$('.gnb_1depth ul a').focusout(function() {
|
||||
$(".gnb_2da").focusout(function() {
|
||||
hide_menu = true;
|
||||
});
|
||||
|
||||
$(document).click(function() {
|
||||
$('#gnb_1dul>li').bind('mouseleave',function(){
|
||||
submenu_hide();
|
||||
});
|
||||
|
||||
$(document).bind('click focusin',function(){
|
||||
if(hide_menu) {
|
||||
$('.gnb_1depth').removeClass('gnb_1depth_over gnb_1depth_on');
|
||||
submenu_hide();
|
||||
}
|
||||
});
|
||||
|
||||
$(document).focusin(function() {
|
||||
if(hide_menu) {
|
||||
$('.gnb_1depth').removeClass('gnb_1depth_over gnb_1depth_on');
|
||||
}
|
||||
});
|
||||
function submenu_hide() {
|
||||
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
|
||||
}
|
||||
|
||||
// 텍스트 리사이즈 카운트 쿠키있으면 실행
|
||||
var resize_act;
|
||||
var text_resize_count = parseInt(get_cookie("ck_font_resize_count"));
|
||||
if(!isNaN(text_resize_count)) {
|
||||
if(text_resize_count > 0)
|
||||
resize_act = "increase";
|
||||
else if(text_resize_count < 0)
|
||||
resize_act = "decrease";
|
||||
|
||||
if(Math.abs(text_resize_count) > 0)
|
||||
font_resize2("container", resize_act, Math.abs(text_resize_count));
|
||||
}
|
||||
});
|
||||
|
||||
function menu_rearrange(el)
|
||||
{
|
||||
var width = $("#gnb_1dul").width();
|
||||
var left = w1 = w2 = 0;
|
||||
var idx = $(".gnb_1dli").index(el);
|
||||
|
||||
for(i=0; i<=idx; i++) {
|
||||
w1 = $(".gnb_1dli:eq("+i+")").outerWidth();
|
||||
w2 = $(".gnb_2dli > a:eq("+i+")").outerWidth(true);
|
||||
|
||||
if((left + w2) > width) {
|
||||
el.removeClass("gnb_1dli_over").addClass("gnb_1dli_over2");
|
||||
}
|
||||
|
||||
left += w1;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user