해당 페이지로 이동하면 메뉴의 색깔을 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에서 해주시기 바랍니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 5352 | 11년 전 | 2419 | ||
| 5351 | 11년 전 | 2181 | ||
| 5350 | 11년 전 | 2308 | ||
| 5349 | 11년 전 | 7558 | ||
| 5348 | 11년 전 | 2048 | ||
| 5347 |
bewitched
|
11년 전 | 1772 | |
| 5346 | 11년 전 | 1282 | ||
| 5345 | 11년 전 | 1355 | ||
| 5344 | 12년 전 | 3071 | ||
| 5343 |
프로프리랜서
|
12년 전 | 2352 | |
| 5342 |
프로프리랜서
|
12년 전 | 1921 | |
| 5341 |
프로프리랜서
|
12년 전 | 1762 | |
| 5340 |
프로프리랜서
|
12년 전 | 1816 | |
| 5339 | 12년 전 | 1431 | ||
| 5338 | 12년 전 | 3145 | ||
| 5337 |
프로프리랜서
|
12년 전 | 2248 | |
| 5336 |
프로프리랜서
|
12년 전 | 1707 | |
| 5335 |
프로프리랜서
|
12년 전 | 4043 | |
| 5334 |
프로프리랜서
|
12년 전 | 1353 | |
| 5333 |
프로프리랜서
|
12년 전 | 1794 | |
| 5332 |
차가운바람
|
12년 전 | 1184 | |
| 5331 | 12년 전 | 2854 | ||
| 5330 | 12년 전 | 3655 | ||
| 5329 | 12년 전 | 4539 | ||
| 5328 | 12년 전 | 2583 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기