<script language='javascript'>
var pop_cnt = parseInt("10");
var now_height = parseInt(-<?=$pop_line_height?>);
var now_list = 1;
function go_time () {
time = setInterval("move_bar()", 50);
}
function move_bar () {
now_height++;
for(i=0;i<pop_cnt;i++)
document.getElementById("tdpop" + i).className = 'rankoff';
document.getElementById("tdpop" + now_list).className = 'rankon';
if (now_height == 0) {
now_list++;
}
if (now_list == pop_cnt) {
clearInterval(time);
now_list = 0;
setTimeout("go_time()", 3000);
}
}
setTimeout("go_time()", 2000);
</script>
이렇게 소스를 작성했습니다.
근데 이상한게
<div id="tdpop0" class="rankon"></div>~<div id="tdpop9" class="rankoff"></div>
까지 해놓고 안에 글을 넣었습니다.
그런데 tdpop0~2 까지만 작동하더니 멈추더라구요.. 또한 그다음 리셋되서 재작동이 안됩니다..
도아주세요 ㅜ_ㅜ.,,
var pop_cnt = parseInt("10");
var now_height = parseInt(-<?=$pop_line_height?>);
var now_list = 1;
function go_time () {
time = setInterval("move_bar()", 50);
}
function move_bar () {
now_height++;
for(i=0;i<pop_cnt;i++)
document.getElementById("tdpop" + i).className = 'rankoff';
document.getElementById("tdpop" + now_list).className = 'rankon';
if (now_height == 0) {
now_list++;
}
if (now_list == pop_cnt) {
clearInterval(time);
now_list = 0;
setTimeout("go_time()", 3000);
}
}
setTimeout("go_time()", 2000);
</script>
이렇게 소스를 작성했습니다.
근데 이상한게
<div id="tdpop0" class="rankon"></div>~<div id="tdpop9" class="rankoff"></div>
까지 해놓고 안에 글을 넣었습니다.
그런데 tdpop0~2 까지만 작동하더니 멈추더라구요.. 또한 그다음 리셋되서 재작동이 안됩니다..
도아주세요 ㅜ_ㅜ.,,
댓글 2개
[code]
<script language='javascript'>
var pop_cnt = 10;
var now_list = 1;
function move_bar() {
for(var i=0; i<pop_cnt; i++)
document.getElementById("tdpop" + i).className = 'rankoff';
document.getElementById("tdpop" + now_list).className = 'rankon';
now_list++;
if (now_list == pop_cnt)
now_list = 0;
}
setInterval("move_bar()", 2000);
</script>
[/code]
<script language='javascript'>
var pop_cnt = 10;
var now_list = 1;
function move_bar() {
for(var i=0; i<pop_cnt; i++)
document.getElementById("tdpop" + i).className = 'rankoff';
document.getElementById("tdpop" + now_list).className = 'rankon';
now_list++;
if (now_list == pop_cnt)
now_list = 0;
}
setInterval("move_bar()", 2000);
</script>
[/code]
게시글 목록
| 번호 | 제목 |
|---|---|
| 284172 | |
| 284170 | |
| 284167 | |
| 284164 | |
| 284161 | |
| 284159 | |
| 284155 | |
| 284152 | |
| 284151 | |
| 284148 | |
| 284142 | |
| 284141 | |
| 284137 | |
| 284136 | |
| 284135 | |
| 284127 | |
| 284121 | |
| 284120 | |
| 284116 | |
| 284115 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기