fadein 효과를 사용한 2번째 예제입니다.
<ul id="scroll">
<li id="main_img_img0" style="position:absolute;z-index:10;top:0px;left:0;width:100%;"><img src="images/common/visual1.jpg" title="" alt=""></li>
<li id="main_img_img2" style="position:absolute;z-index:11;top:0px;left:0;width:100%;display:none;"><img src="images/common/visual2.jpg" title="" alt=""></li>
<li id="main_img_img3" style="position:absolute;z-index:11;top:0px;left:0;width:100%;display:none;"><img src="images/common/visual3.jpg" title="" alt=""></li>
</ul>
<script type="text/javascript">
//<![CDATA[
var s = null;
var j = 1;
var times = 4000;
function TiVis(){
clearInterval(s);
ButtonClear();
if( j == 0 ){ $("#main_img_img0").css({zIndex : 13});$("#main_img_img2").hide(); $("#main_img_img_tab1").attr('src','images/common/main_img_on.gif');$("#main_img_img0").fadeIn(1000);}
if( j == 1 ){ $("#main_img_img0").css({zIndex : 10});$("#main_img_img0").hide(); $("#main_img_img3").hide(); $("#main_img_img_tab2").attr('src','images/common/main_img_on.gif');$("#main_img_img2").fadeIn(1000);}
if( j == 2 ){ $("#main_img_img_tab3").attr('src','images/common/main_img_on.gif'); $("#main_img_img3").fadeIn(1000); }
j++;
if(j==3) {
j=0;
}
s = setInterval( "TiVis()", times );
}
window.onload = function(){
/*$("#main_img_img0").css({zIndex : 10});
$("#main_img_img2").css({zIndex : 11});
$("#main_img_img3").css({zIndex : 12});*/
$("#main_img_img_tab1").css({cursor:'pointer'});
$("#main_img_img_tab2").css({cursor:'pointer'});
$("#main_img_img_tab3").css({cursor:'pointer'});
s = setInterval( "TiVis()", times );
}
function ButtonClear(){
$("#main_img_img_tab1").attr('src','images/common/main_img_off.gif');
$("#main_img_img_tab2").attr('src','images/common/main_img_off.gif');
$("#main_img_img_tab3").attr('src','images/common/main_img_off.gif');
}
$(document).ready(function(){
$(".number_tab img").click(function(){
j = Number($(this).val());
if( j == 1 ){ $("#main_img_img0").css({zIndex : 13});$("#main_img_img2").hide();}
if( j == 2 ){ $("#main_img_img0").css({zIndex : 10});$("#main_img_img0").hide(); $("#main_img_img3").hide();}
ButtonClear();
TiVis();
});
});
//]]>
</script>
댓글 4개
게시판 목록
팁게시판
질문은 상단의 QA에서 해주시기 바랍니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 5652 | 10년 전 | 1303 | ||
| 5651 |
멋진남자임
|
10년 전 | 1415 | |
| 5650 | 10년 전 | 3124 | ||
| 5649 | 10년 전 | 1509 | ||
| 5648 |
멋진남자임
|
10년 전 | 2022 | |
| 5647 | 10년 전 | 5016 | ||
| 5646 | 10년 전 | 1743 | ||
| 5645 |
멋진남자임
|
10년 전 | 1894 | |
| 5644 | 10년 전 | 1565 | ||
| 5643 |
|
10년 전 | 1685 | |
| 5642 | 10년 전 | 2382 | ||
| 5641 | 10년 전 | 1493 | ||
| 5640 | 10년 전 | 1472 | ||
| 5639 | 10년 전 | 2407 | ||
| 5638 |
|
10년 전 | 3238 | |
| 5637 | 10년 전 | 3832 | ||
| 5636 | 10년 전 | 2110 | ||
| 5635 | 10년 전 | 1463 | ||
| 5634 | 10년 전 | 3370 | ||
| 5633 |
CHAVO
|
10년 전 | 1049 | |
| 5632 | 10년 전 | 2458 | ||
| 5631 | 10년 전 | 3215 | ||
| 5630 | 10년 전 | 1248 | ||
| 5629 | 10년 전 | 1346 | ||
| 5628 | 10년 전 | 2570 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기