해당 페이지로 이동하면 메뉴의 색깔을 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에서 해주시기 바랍니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 5952 | 9년 전 | 307 | ||
| 5951 | 9년 전 | 227 | ||
| 5950 | 9년 전 | 290 | ||
| 5949 | 9년 전 | 447 | ||
| 5948 | 9년 전 | 190 | ||
| 5947 | 9년 전 | 206 | ||
| 5946 | 9년 전 | 198 | ||
| 5945 | 9년 전 | 350 | ||
| 5944 | 9년 전 | 340 | ||
| 5943 | 9년 전 | 422 | ||
| 5942 | 9년 전 | 370 | ||
| 5941 | 9년 전 | 551 | ||
| 5940 | 9년 전 | 434 | ||
| 5939 | 9년 전 | 379 | ||
| 5938 |
씨에이치넷
|
9년 전 | 1295 | |
| 5937 | 9년 전 | 405 | ||
| 5936 | 9년 전 | 369 | ||
| 5935 | 9년 전 | 364 | ||
| 5934 | 9년 전 | 296 | ||
| 5933 | 9년 전 | 713 | ||
| 5932 | 9년 전 | 283 | ||
| 5931 | 9년 전 | 302 | ||
| 5930 | 9년 전 | 488 | ||
| 5929 | 9년 전 | 291 | ||
| 5928 | 9년 전 | 356 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기