0
나는 아주 간단한 슬라이드 쇼를 가지고 있지만 결국에는 올라갈 것입니다. 그래서 그것은 슬롯 머신처럼 보입니다. 그러나 그것은 내가 원하는 것이 아닙니다. jQuery에 익숙하지 않지만 if 문이 필요하다고 생각합니다.슬라이드 쇼가 끝날 때까지
하지만 가장 간단한 방법은 무엇입니까? 난 당신이 에 도달 할 때, '케이스 4'나에게을
function slideShow(){
var current = 1;
var start=1;
var top = 194;
var zero = 0;
var transition = 3000;
$.timer(transition*4, function (change) {
switch(current){
case 1:
$(".slide").stop().animate({top: -top+"px"}, { duration: transition});
current++;
break;
case 2:
$(".slide").stop().animate({top: -top*2+"px"}, { duration: transition});
current++;
break;
case 3:
$(".slide").stop().animate({top: -top*3+"px"}, { duration: transition});
current++;
break;
case 4:
$(".slide").stop().animate({top: zero+"px"}, {duration: transition});
current = start;
break;
timer.reset();
}
});
예. timer.reset을 제외하고는 알았습니다. 그러나 내가 바꿀 필요가있는 것은 적절하게 최고입니다 : 꼭대기 톱 : + 오른쪽 상단? – user1268465