해당 페이지로 이동하면 메뉴의 색깔을 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에서 해주시기 바랍니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 4902 | 13년 전 | 3558 | ||
| 4901 |
후라보노보노
|
13년 전 | 2181 | |
| 4900 |
|
13년 전 | 4131 | |
| 4899 |
|
13년 전 | 3378 | |
| 4898 |
|
13년 전 | 4901 | |
| 4897 | 13년 전 | 2695 | ||
| 4896 | 13년 전 | 2166 | ||
| 4895 |
|
13년 전 | 2499 | |
| 4894 |
|
13년 전 | 2835 | |
| 4893 | 13년 전 | 1473 | ||
| 4892 | 13년 전 | 1910 | ||
| 4891 |
|
13년 전 | 1920 | |
| 4890 | 13년 전 | 6109 | ||
| 4889 |
|
13년 전 | 1567 | |
| 4888 |
프로프리랜서
|
13년 전 | 1393 | |
| 4887 | 13년 전 | 1778 | ||
| 4886 |
|
13년 전 | 2247 | |
| 4885 | 13년 전 | 1583 | ||
| 4884 | 13년 전 | 1909 | ||
| 4883 | 13년 전 | 3305 | ||
| 4882 | 13년 전 | 3582 | ||
| 4881 | 13년 전 | 1947 | ||
| 4880 | 13년 전 | 700 | ||
| 4879 | 13년 전 | 5865 | ||
| 4878 |
Giggle
|
13년 전 | 1706 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기