사용자: gnb 아이디 클래스명 수정
This commit is contained in:
@ -75,28 +75,30 @@ a:active {color:#000;text-decoration:underline}
|
||||
/* gnb js off */
|
||||
#gnb {z-index:10;margin:-1px 0 0;border-top:1px solid #e7f1ed;border-bottom:1px solid #c3c7c5;background:#f0f4f8}
|
||||
#gnb h2 {position:absolute;margin:0;padding:0;font-size:0;line-height:0;overflow:hidden}
|
||||
#gnb_ul {margin:0 auto;padding:0;width:980px;zoom:1}
|
||||
#gnb_ul:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.gnb_1depth {z-index:10;clear:both;zoom:1}
|
||||
.gnb_1depth:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.gnb_1depth a {display:block;float:left;width:80px;height:35px;font-weight:bold;line-height:2.95em;text-decoration:none}
|
||||
.gnb_1depth a:focus,
|
||||
.gnb_1depth a:hover {text-decoration:none}
|
||||
.gnb_1depth ul {float:left;width:auto}
|
||||
.gnb_2depth {float:left}
|
||||
.gnb_2depth a {font-weight:normal}
|
||||
#gnb_1dul {margin:0 auto;padding:0;width:980px;zoom:1}
|
||||
#gnb_1dul:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.gnb_1dli {z-index:10;clear:both;zoom:1}
|
||||
.gnb_1dli:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.gnb_1da {display:block;float:left;width:80px;height:35px;font-weight:bold;line-height:2.95em;text-decoration:none}
|
||||
.gnb_1da:focus,
|
||||
.gnb_1da:hover {text-decoration:none}
|
||||
.gnb_2dul {float:left;width:auto}
|
||||
.gnb_2dli {float:left}
|
||||
.gnb_2da {display:block;float:left;width:80px;height:35px;line-height:2.95em;text-decoration:none}
|
||||
.gnb_2da:focus,
|
||||
.gnb_2da:hover {text-decoration:none}
|
||||
/* gnb js on */
|
||||
.gnb_js {}
|
||||
.gnb_js #gnb_ul {zoom:1}
|
||||
.gnb_js #gnb_ul:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.gnb_js .gnb_1depth {clear:none;position:relative;float:left}
|
||||
.gnb_js .gnb_1depth a {text-align:center}
|
||||
.gnb_js .gnb_1depth_air a {float:none;background:#f7f7f2;color:#000}
|
||||
.gnb_js .gnb_1depth_on a {float:none;border-color:#e0e5e9;background:#fff;color:#000}
|
||||
.gnb_js .gnb_sub_ul {position:absolute;top:35px;width:1px;height:1px;overflow:hidden}
|
||||
.gnb_js .gnb_2depth a {display:inline-block;float:none !important;padding:0 10px;width:161px;text-align:left}
|
||||
.gnb_1depth_over .gnb_sub_ul {left:-1px;width:181px;height:auto;border:1px solid #c3c7c5;border-top:0;background:#fff}
|
||||
.gnb_1depth_over2 .gnb_sub_ul {right:-1px;width:181px;height:auto;border:1px solid #c3c7c5;border-top:0;background:#fff}
|
||||
.gnb_js #gnb_1dul {zoom:1}
|
||||
.gnb_js #gnb_1dul:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.gnb_js .gnb_1dli {clear:none;position:relative;float:left}
|
||||
.gnb_js .gnb_1da {text-align:center}
|
||||
.gnb_js .gnb_1dli_air a {float:none;background:#f7f7f2;color:#000}
|
||||
.gnb_js .gnb_1dli_on a {float:none;border-color:#e0e5e9;background:#fff;color:#000}
|
||||
.gnb_js .gnb_2dul {position:absolute;top:35px;width:1px;height:1px;overflow:hidden}
|
||||
.gnb_js .gnb_2da {display:inline-block;float:none !important;padding:0 10px;width:161px;text-align:left}
|
||||
.gnb_1dli_over .gnb_2dul {left:-1px;width:181px;height:auto;border:1px solid #c3c7c5;border-top:0;background:#fff}
|
||||
.gnb_1dli_over2 .gnb_2dul {right:-1px;width:181px;height:auto;border:1px solid #c3c7c5;border-top:0;background:#fff}
|
||||
|
||||
.gnb_empty {width:100%;height:35px;text-align:center;line-height:2.95em}
|
||||
|
||||
|
||||
10
head.php
10
head.php
@ -132,21 +132,21 @@ if ($config['cf_include_head']) {
|
||||
<nav id="gnb">
|
||||
<script>$('#gnb').addClass('gnb_js');</script>
|
||||
<h2>홈페이지 메인메뉴</h2>
|
||||
<ul id="gnb_ul">
|
||||
<ul id="gnb_1dul">
|
||||
<?php
|
||||
$sql = " select * from {$g4['group_table']} where gr_show_menu = '1' and gr_device <> 'mobile' order by gr_order ";
|
||||
$result = sql_query($sql);
|
||||
for ($gi=0; $row=sql_fetch_array($result); $gi++) { // gi 는 group index
|
||||
?>
|
||||
<li class="gnb_1depth">
|
||||
<a href="<?php echo G4_BBS_URL ?>/group.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo $row['gr_subject'] ?></a>
|
||||
<ul class="gnb_sub_ul">
|
||||
<li class="gnb_1dli">
|
||||
<a href="<?php echo G4_BBS_URL ?>/group.php?gr_id=<?php echo $row['gr_id'] ?>" class="gnb_1da"><?php echo $row['gr_subject'] ?></a>
|
||||
<ul class="gnb_2dul">
|
||||
<?php
|
||||
$sql2 = " select * from {$g4['board_table']} where gr_id = '{$row['gr_id']}' and bo_show_menu = '1' and bo_device <> 'mobile' order by bo_order ";
|
||||
$result2 = sql_query($sql2);
|
||||
for ($bi=0; $row2=sql_fetch_array($result2); $bi++) { // bi 는 board index
|
||||
?>
|
||||
<li class="gnb_2depth"><a href="<?php echo G4_BBS_URL ?>/board.php?bo_table=<?php echo $row2['bo_table'] ?>"><?php echo $row2['bo_subject'] ?></a></li>
|
||||
<li class="gnb_2dli"><a href="<?php echo G4_BBS_URL ?>/board.php?bo_table=<?php echo $row2['bo_table'] ?>" class="gnb_2da"><?php echo $row2['bo_subject'] ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
@ -15,11 +15,11 @@ $(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_over2 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;
|
||||
}
|
||||
@ -29,17 +29,17 @@ $(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_over2 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;
|
||||
});
|
||||
@ -48,18 +48,18 @@ $(function(){
|
||||
hide_menu = true;
|
||||
});
|
||||
|
||||
$(".gnb_1depth ul a").focusin(function() {
|
||||
$(".gnb_1depth").removeClass("gnb_1depth_over gnb_1depth_over2 gnb_1depth_on");
|
||||
var $gnb_li = $(this).closest(".gnb_1depth").addClass("gnb_1depth_over gnb_1depth_on");
|
||||
menu_rearrange($(this).closest(".gnb_1depth"));
|
||||
$(".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;
|
||||
});
|
||||
|
||||
$('#gnb_ul>li').bind('mouseleave',function(){
|
||||
$('#gnb_1dul>li').bind('mouseleave',function(){
|
||||
submenu_hide();
|
||||
});
|
||||
|
||||
@ -70,7 +70,7 @@ $(function(){
|
||||
});
|
||||
|
||||
function submenu_hide() {
|
||||
$(".gnb_1depth").removeClass("gnb_1depth_over gnb_1depth_over2 gnb_1depth_on");
|
||||
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
|
||||
}
|
||||
|
||||
// 텍스트 리사이즈 카운트 쿠키있으면 실행
|
||||
@ -89,16 +89,16 @@ $(function(){
|
||||
|
||||
function menu_rearrange(el)
|
||||
{
|
||||
var width = $("#gnb_ul").width();
|
||||
var width = $("#gnb_1dul").width();
|
||||
var left = w1 = w2 = 0;
|
||||
var idx = $(".gnb_1depth").index(el);
|
||||
var idx = $(".gnb_1dli").index(el);
|
||||
|
||||
for(i=0; i<=idx; i++) {
|
||||
w1 = $(".gnb_1depth:eq("+i+")").outerWidth();
|
||||
w2 = $(".gnb_2depth > a:eq("+i+")").outerWidth(true);
|
||||
w1 = $(".gnb_1dli:eq("+i+")").outerWidth();
|
||||
w2 = $(".gnb_2dli > a:eq("+i+")").outerWidth(true);
|
||||
|
||||
if((left + w2) > width) {
|
||||
el.removeClass("gnb_1depth_over").addClass("gnb_1depth_over2");
|
||||
el.removeClass("gnb_1dli_over").addClass("gnb_1dli_over2");
|
||||
}
|
||||
|
||||
left += w1;
|
||||
|
||||
Reference in New Issue
Block a user