마우스 오버시 레이어 보이게 하는 팁입니다.
버튼 하나에 레이어 하나 이렇게만 만들다가
지금 작업중인 사이트는 버튼이랑 설명레이어가 여러개가 되길래 만들어봤습니다.
<style type="text/css">
.help_btn{cursor:pointer;}
#help_div_0{display:none; position:absolute; left:0px; top:-210px;}
#help_div_1{display:none; position:absolute; left:80px; top:-210px;}
#help_div_2{display:none; position:absolute; left:185px; top:-210px;}
</style>
<div style="position:relative">
<input type="radio">라디오1 <img src="img/icon_help.gif" class="help_btn">
<input type="radio">라디오2 <img src="img/icon_help.gif" class="help_btn">
<input type="radio">라디오3 <img src="img/icon_help.gif" class="help_btn">
<div id="help_div_0">설명 1</div>
<div id="help_div_1">설명 2</div>
<div id="help_div_2">설명 3</div>
</div>
<script>
$(".help_btn").each(function(index) {
$(this).mouseover(function() {
$("#help_div_" + index).css("display", "block");
});
$(this).mouseout(function() {
$("#help_div_" + index).css("display", "none");
});
});
</script>
더 응용하면 레이어 위치까지도 제어할 수 있을 듯 하네요~
파이어폭스, ie8 만 테스트해봤습니다.
버튼 하나에 레이어 하나 이렇게만 만들다가
지금 작업중인 사이트는 버튼이랑 설명레이어가 여러개가 되길래 만들어봤습니다.
<style type="text/css">
.help_btn{cursor:pointer;}
#help_div_0{display:none; position:absolute; left:0px; top:-210px;}
#help_div_1{display:none; position:absolute; left:80px; top:-210px;}
#help_div_2{display:none; position:absolute; left:185px; top:-210px;}
</style>
<div style="position:relative">
<input type="radio">라디오1 <img src="img/icon_help.gif" class="help_btn">
<input type="radio">라디오2 <img src="img/icon_help.gif" class="help_btn">
<input type="radio">라디오3 <img src="img/icon_help.gif" class="help_btn">
<div id="help_div_0">설명 1</div>
<div id="help_div_1">설명 2</div>
<div id="help_div_2">설명 3</div>
</div>
<script>
$(".help_btn").each(function(index) {
$(this).mouseover(function() {
$("#help_div_" + index).css("display", "block");
});
$(this).mouseout(function() {
$("#help_div_" + index).css("display", "none");
});
});
</script>
더 응용하면 레이어 위치까지도 제어할 수 있을 듯 하네요~
파이어폭스, ie8 만 테스트해봤습니다.
게시글 목록
| 번호 | 제목 |
|---|---|
| 18200 | |
| 18195 | |
| 18193 | |
| 18181 | |
| 18179 | |
| 18173 | |
| 18170 | |
| 18164 | |
| 18158 | |
| 18155 | |
| 18152 |
JavaScript
한글과컴퓨터 키워드추출스크립트.
2
|
| 18151 | |
| 18150 |
JavaScript
위에서 아래로 내려오는 효과 6가지
|
| 18140 | |
| 18139 | |
| 18138 |
JavaScript
마우스로 td 간격 조정하기.
1
|
| 18131 | |
| 18130 |
JavaScript
엘레먼트에 다이렉트로 변수,배열,객체 심기
|
| 18120 | |
| 18119 | |
| 18118 |
jQuery
0원팁- 숫자형 아이디에 접근하기
1
|
| 18117 |
jQuery
유용하게 써먹는 반응형 grid
1
|
| 18116 | |
| 18111 |
MySQL
db에서 트리거 만들기
|
| 18110 | |
| 18108 |
JavaScript
디바운스 debounce의 개념
1
|
| 18107 |
JavaScript
jquery 타이머 만들기
2
|
| 18106 | |
| 18100 | |
| 18090 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기