해당 페이지로 이동하면 메뉴의 색깔을 red색으로 하려고 합니다.
예를 들면 "무통장입금확인"을 누르면 페이지 이동 후 해당 메뉴가 빨강색으로 변경되어야 합니ㅏㄷ.
페이지가 이동한 후 jquery로 어떻게 해야하는지 모르겠네요
아래 소스는 기본적으로 만든 내용입니다. 도와 주시기 바랍니다. ^^
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>메뉴</title>
</head>
<script type="text/javascript">
$(function() {
});
</script>
<body>
<style type="text/css">
#menu5 {
width: 160px;
}
#menu5 li a {
height: 26px;
voice-family: "\"}\"";
voice-family: inherit;
text-decoration: none;
text-align:left;
font-weight:bold;
}
#menu5 li a:link, #menu5 li a:visited {
height: 26px;
color: #7e7e7e;
display: block;
background: repeat-x url(<?=$g4[shop_img_path]?>/sub_menu_bg.gif) ;
padding: 8px 0 0 18px;
}
.menu5_class {
color:#C60;
}
#menu5 li a:hover {
height: 26px;
color: #393939;
background: repeat-x url(<?=$g4[shop_img_path]?>/sub_menu_bg1.gif) ;
padding: 8px 0 0 18px;
}
#menu5 ul {
height: 26px;
list-style: none;
margin: 0;
padding: 0;
}
#cus { background:#FFF; clear:both }
#cus_menu { width:160px; float:left;}
#cus_space {width:35px; float:left; }
#cus_contents {width:756px; float:left;}
#cus_space2 {width:13px; float:right;}
</style>
<div id="menu5">
<ul id="menu5_ul">
<li><a href="<?=$g4[bbs_path]?>/board.php?bo_table=money" >무통장입금확인</a></li>
<li><a href="<?=$g4[bbs_path]?>/board.php?bo_table=qa" >일반문의</a></li>
<li><a href="<?=$g4[bbs_path]?>/board.php?bo_table=gallery" >갤러리</a></li>
<li><a href="<?=$g4[shop_path]?>/itemuselist.php" >사용후기</a></li>
</ul>
</div>
</body>
</html>
댓글 2개
해당페이지에 있을때
$("#셀렉터").removeClass(".menu").addClass(".menuon");
이런식으로 처리하시면 됩니다.
무통장입금 페이지이면 이전 class는 지우고 red에 해당하는 menuon class를 적용시키면 되겠죠
<style>
menu{//기본색적용}
menuon{//빨강색적용}
</style>
게시판 목록
팁게시판
질문은 상단의 QA에서 해주시기 바랍니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 77 | 20년 전 | 2921 | ||
| 76 | 20년 전 | 6214 | ||
| 75 | 20년 전 | 4456 | ||
| 74 | 20년 전 | 5758 | ||
| 73 | 20년 전 | 3616 | ||
| 72 | 20년 전 | 5947 | ||
| 71 | 20년 전 | 3108 | ||
| 70 | 20년 전 | 2832 | ||
| 69 | 20년 전 | 2633 | ||
| 68 | 20년 전 | 2445 | ||
| 67 | 20년 전 | 2649 | ||
| 66 | 20년 전 | 2664 | ||
| 65 | 20년 전 | 3798 | ||
| 64 | 20년 전 | 2807 | ||
| 63 | 20년 전 | 2400 | ||
| 62 | 20년 전 | 2253 | ||
| 61 | 20년 전 | 3038 | ||
| 60 | 20년 전 | 3106 | ||
| 59 | 20년 전 | 2485 | ||
| 58 | 20년 전 | 2574 | ||
| 57 | 20년 전 | 2951 | ||
| 56 | 20년 전 | 2250 | ||
| 55 | 20년 전 | 2725 | ||
| 54 | 20년 전 | 2101 | ||
| 53 | 20년 전 | 2331 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기