[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개
게시글 목록
| 번호 | 제목 |
|---|---|
| 2537 | |
| 2536 | |
| 2532 | |
| 2526 | |
| 2524 | |
| 2522 | |
| 2519 | |
| 2507 | |
| 2506 | |
| 2505 | |
| 2499 | |
| 2484 | |
| 2475 | |
| 2474 | |
| 2468 | |
| 2467 | |
| 2465 | |
| 2461 | |
| 2456 | |
| 2454 | |
| 2453 | |
| 2448 | |
| 2445 | |
| 2444 | |
| 2441 | |
| 2435 | |
| 2433 | |
| 2431 | |
| 2430 | |
| 2424 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기