해당 페이지로 이동하면 메뉴의 색깔을 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에서 해주시기 바랍니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 5327 |
GINUSSOFT
|
12년 전 | 5130 | |
| 5326 | 12년 전 | 6215 | ||
| 5325 | 12년 전 | 1916 | ||
| 5324 |
|
12년 전 | 1695 | |
| 5323 |
CTOMAN
|
12년 전 | 1969 | |
| 5322 | 12년 전 | 1752 | ||
| 5321 | 12년 전 | 2428 | ||
| 5320 | 12년 전 | 3664 | ||
| 5319 | 12년 전 | 1603 | ||
| 5318 |
프로프리랜서
|
12년 전 | 1353 | |
| 5317 |
프로프리랜서
|
12년 전 | 991 | |
| 5316 |
프로프리랜서
|
12년 전 | 1240 | |
| 5315 |
프로프리랜서
|
12년 전 | 1155 | |
| 5314 |
프로프리랜서
|
12년 전 | 1365 | |
| 5313 |
프로프리랜서
|
12년 전 | 1955 | |
| 5312 |
프로프리랜서
|
12년 전 | 1510 | |
| 5311 |
프로프리랜서
|
12년 전 | 1352 | |
| 5310 |
프로프리랜서
|
12년 전 | 3899 | |
| 5309 |
프로프리랜서
|
12년 전 | 1522 | |
| 5308 | 12년 전 | 1180 | ||
| 5307 | 12년 전 | 5142 | ||
| 5306 | 12년 전 | 2509 | ||
| 5305 |
오늘도망했다
|
12년 전 | 2242 | |
| 5304 |
senseme
|
12년 전 | 3342 | |
| 5303 | 12년 전 | 3627 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기