슬라이드를 작성한 스크립트를 만들었습니다. 아래 코드를 참조하십시오.다음 작업을 수행하는보다 쉬운 방법
<script>
jQuery(document).ready(function() {
jQuery(".da-feedback .da-quote").hide();
jQuery(".da-feedback .da-quote:first-child").show();
setTimeout('NextItem(1)',6000);
});
function NextItem($n) {
jQuery('.da-feedback .da-quote:nth-child('+$n+')').slideUp('slow');
$n = $n + 1;
jQuery('.da-feedback .da-quote:nth-child('+$n+')').slideDown('slow');
setTimeout('NextItem('+$n+')',6000);
}
</script>
<div class="da-feedback">
<div class="da-quote" style="display: none; ">....</div>
<div class="da-quote" style="display: none; ">....</div>
<div class="da-quote" style="display: none; ">....</div>
</div>
jquerys가이 기능을 쉽게 사용할 수 있는지 알고 싶습니다.
많이 깔끔하게 보입니다. 나는 이것을 언급하지 않았다는 것을 알지만 회 돌이를 만드는 방법은 무엇입니까? –
'.slideDown'이 완료되면 콜백 함수가 발생합니다.이 경우 콜백 함수는'NextItem'에 대한 재귀 호출입니다. – Blazemonger
대단히 감사합니다. –