[code]
<script type='text/javascript' src='<?php echo G5_URL?>/jquery-mega-drop-down-menu/js/jquery.hoverIntent.minified.js'></script>
<script type='text/javascript' src='<?php echo G5_URL?>/jquery-mega-drop-down-menu/js/jquery.dcmegamenu.1.2.js'></script>
<script type="text/javascript">
$(document).ready(function($){
$('#mega-menu-9').dcMegaMenu({
rowItems: '3',
speed: 'fast',
effect: 'fade'
});
});
</script>
<link href="<?php echo G5_URL?>/jquery-mega-drop-down-menu/css/skins/white.css" rel="stylesheet" type="text/css" />
<nav id="white-gnb">
<div id="white-menu">
<ul id="mega-menu-9" class="mega-menu">
<?php
$sql = " select *
from {$g5['menu_table']}
where me_use = '1'
and length(me_code) = '2'
order by me_order, me_id ";
$result = sql_query($sql, false);
$gnb_zindex = 999; // gnb_1dli z-index 값 설정용
for ($i=0; $row=sql_fetch_array($result); $i++) {
?>
<li style="z-index:<?php echo $gnb_zindex--; ?>">
<a href="<?php echo $row['me_link']; ?>" target="_<?php echo $row['me_target']; ?>"><?php echo $row['me_name'] ?></a>
<?php
$sql2 = " select *
from {$g5['menu_table']}
where me_use = '1'
and length(me_code) = '4'
and substring(me_code, 1, 2) = '{$row['me_code']}'
order by me_order, me_id ";
$result2 = sql_query($sql2);
for ($k=0; $row2=sql_fetch_array($result2); $k++) {
if($k == 0)
echo '<ul>'.PHP_EOL;
?>
<li><a href="<?php echo $row2['me_link']; ?>" target="_<?php echo $row2['me_target']; ?>"><?php echo $row2['me_name'] ?></a></li>
<?php
}
if($k > 0)
echo '</ul>'.PHP_EOL;
?>
</li>
<?php
}
if ($i == 0) { ?>
<li>메뉴 준비 중입니다.<?php if ($is_admin) { ?> <br><a href="<?php echo G5_ADMIN_URL; ?>/menu_list.php">관리자모드 > 환경설정 > 메뉴설정</a>에서 설정하실 수 있습니다.<?php } ?></li>
<?php } ?>
</ul>
</div>
</nav>
[/code]
응용해 보시면 많은 메뉴를 만드실수 있으실겁니다.
<script type='text/javascript' src='<?php echo G5_URL?>/jquery-mega-drop-down-menu/js/jquery.hoverIntent.minified.js'></script>
<script type='text/javascript' src='<?php echo G5_URL?>/jquery-mega-drop-down-menu/js/jquery.dcmegamenu.1.2.js'></script>
<script type="text/javascript">
$(document).ready(function($){
$('#mega-menu-9').dcMegaMenu({
rowItems: '3',
speed: 'fast',
effect: 'fade'
});
});
</script>
<link href="<?php echo G5_URL?>/jquery-mega-drop-down-menu/css/skins/white.css" rel="stylesheet" type="text/css" />
<nav id="white-gnb">
<div id="white-menu">
<ul id="mega-menu-9" class="mega-menu">
<?php
$sql = " select *
from {$g5['menu_table']}
where me_use = '1'
and length(me_code) = '2'
order by me_order, me_id ";
$result = sql_query($sql, false);
$gnb_zindex = 999; // gnb_1dli z-index 값 설정용
for ($i=0; $row=sql_fetch_array($result); $i++) {
?>
<li style="z-index:<?php echo $gnb_zindex--; ?>">
<a href="<?php echo $row['me_link']; ?>" target="_<?php echo $row['me_target']; ?>"><?php echo $row['me_name'] ?></a>
<?php
$sql2 = " select *
from {$g5['menu_table']}
where me_use = '1'
and length(me_code) = '4'
and substring(me_code, 1, 2) = '{$row['me_code']}'
order by me_order, me_id ";
$result2 = sql_query($sql2);
for ($k=0; $row2=sql_fetch_array($result2); $k++) {
if($k == 0)
echo '<ul>'.PHP_EOL;
?>
<li><a href="<?php echo $row2['me_link']; ?>" target="_<?php echo $row2['me_target']; ?>"><?php echo $row2['me_name'] ?></a></li>
<?php
}
if($k > 0)
echo '</ul>'.PHP_EOL;
?>
</li>
<?php
}
if ($i == 0) { ?>
<li>메뉴 준비 중입니다.<?php if ($is_admin) { ?> <br><a href="<?php echo G5_ADMIN_URL; ?>/menu_list.php">관리자모드 > 환경설정 > 메뉴설정</a>에서 설정하실 수 있습니다.<?php } ?></li>
<?php } ?>
</ul>
</div>
</nav>
[/code]
응용해 보시면 많은 메뉴를 만드실수 있으실겁니다.
댓글 5개
게시글 목록
| 번호 | 제목 |
|---|---|
| 3325 | |
| 3322 | |
| 3321 | |
| 3312 | |
| 3303 | |
| 3297 | |
| 3293 | |
| 3287 | |
| 3281 | |
| 3280 | |
| 3277 | |
| 3267 | |
| 3262 | |
| 3260 | |
| 3258 | |
| 3257 | |
| 3251 | |
| 3248 | |
| 3247 | |
| 3224 | |
| 3203 | |
| 3186 | |
| 3185 | |
| 3181 | |
| 3178 | |
| 3176 | |
| 3170 | |
| 3169 | |
| 3162 | |
| 3152 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기