JQUERY CYCLE Plugin - Problems with 'Timeout' feature
I want to display three images 1second after one another using jQuery carousel. I don't have this using different timeout values for each image however once the images have animated for the third time each different slide starts doing it's own thing! By this I mean that the timings are becoming incoherent with one another. Am I doing something fundamentally wrong? Or is this the right way to use jQuery cycle?
Any help would be mostly appreciated
Code:
<script type="text/javascript">
$(document).ready(function(){
$('#slide1').cycle({
fx: 'fade',
timeout:4000
});
$('#slide2').cycle({
开发者_运维百科 fx: 'fade',
timeout:4200
});
$('#slide3').cycle({
fx: 'fade',
timeout:4400
});
});
</script>
Cheers
Just for anyone who stumbles across this post. The answer is about using 'delay' rather than timeout.
So code would be
<script type="text/javascript">
$(document).ready(function(){
$('#slide1').cycle({
fx: 'fade',
timeout:4000,
delay:0
});
$('#slide2').cycle({
fx: 'fade',
timeout:4000,
delay:200
});
$('#slide3').cycle({
fx: 'fade',
timeout:4000,
delay:400
});
});
</script>
精彩评论