마우스 오버시 레이어 출력~
마우스 오버시 레이어 보이게 하는 팁입니다.
버튼 하나에 레이어 하나 이렇게만 만들다가
지금 작업중인 사이트는 버튼이랑 설명레이어가 여러개가 되길래 만들어봤습니다.
<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 만 테스트해봤습니다.
댓글 2개
12년 전
감사합니다~~
takumi22
12년 전
감사합니다.
게시글 목록
| 번호 | 제목 |
|---|---|
| 27425 | |
| 5811 | |
| 5810 | |
| 27422 | |
| 19316 | |
| 5809 | |
| 5808 | |
| 5807 | |
| 5806 | |
| 27421 | |
| 5801 | |
| 24540 | |
| 24537 | |
| 5798 | |
| 30863 | |
| 5795 | |
| 27416 | |
| 5793 | |
| 27405 | |
| 27403 | |
| 19314 | |
| 19312 |
PHP
우분투 서버 셋팅하는 방법
1
|
| 19309 | |
| 19306 | |
| 19304 |
MySQL
트리거를 이용하여 날짜 자동 업데이트법
1
|
| 19303 | |
| 5791 | |
| 27397 | |
| 19298 |
MySQL
mysql 환경 설정
4
|
| 19293 |
JavaScript
달력소스입니다.
4
|
| 19281 |
PHP
웹사이트 주소 알아내기
11
|
| 19278 |
기타
오라클바인딩기술
2
|
| 19275 | |
| 5787 | |
| 5783 | |
| 5781 | |
| 5773 | |
| 32027 | |
| 19271 | |
| 19269 | |
| 19265 |
정규표현식
IE11에서 사라지는것들이랍니다~
3
|
| 19264 | |
| 5771 | |
| 5770 | |
| 27391 | |
| 27389 | |
| 27387 | |
| 5768 | |
| 27384 | |
| 5767 | |
| 5765 | |
| 27379 | |
| 27374 | |
| 5763 | |
| 27371 | |
| 30846 | |
| 5758 | |
| 27365 | |
| 5756 | |
| 5753 | |
| 19256 |
기타
웹접근성 인증 방법
7
|
| 19250 |
MySQL
my-sql 서브쿼리^^
5
|
| 19248 |
MySQL
기초적인 my sql 쿼리문~
1
|
| 5748 | |
| 19245 |
jQuery
xhtml vs json
2
|
| 19244 |
정규표현식
정규식 표현법
|
| 19242 |
웹서버
리눅스 기본 명령어
1
|
| 19241 |
jQuery
ajax 예제 입니다.
|
| 5746 | |
| 5744 | |
| 5738 | |
| 24534 | |
| 5733 | |
| 19232 |
jQuery
jQuery Performance
8
|
| 19228 |
jQuery
jQuery Event - 이벤트에 생명을~
3
|
| 19225 |
jQuery
jQuery Event - bind() 메서드
2
|
| 19222 |
jQuery
jQuery Event - 이벤트 지원 메서드
2
|
| 19220 | |
| 19219 | |
| 19217 | |
| 19216 |
jQuery
jQuery Core
|
| 19215 | |
| 19214 |
jQuery
jQuery Traverse - Filtering
|
| 19213 | |
| 19212 | |
| 19211 | |
| 19210 | |
| 19209 | |
| 19208 | |
| 19207 | |
| 19206 | |
| 19204 | |
| 5728 | |
| 5727 | |
| 5725 | |
| 19200 |
JavaScript
주소표시
3
|
| 30841 |
CSS
CSS 자료 링크
4
|
| 19196 | |
| 19192 | |
| 27359 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기