I'm trying to cycle three images with these effects:
- One second delay before showing first image
- Image #1 is displayed with a fade-in and slide up effect.
- Image #1 is shown for 5 seconds and then fades out.
[process repeats after this point...]
- One second delay before next image starts.
- Image #2 is displayed with the same fade-in and slide up effect, shown for 5 seconds, fades out... and the process is repeated for Image #3 and loops continuously in same pattern.
This is what I have built so far: http://jsfiddle.net/27uy8/226/ runslide();
function runslide() {
$('#pic1').fadeIn({queue: false, duration: 'slow'}).animate({ top: "-100px" }, 'slow').delay(3500).fadeOut(1500, function() {
$('#pic2').fadeIn({queue: false, duration: 'slow'}).animate({ top: "-100px" }, 'slow').delay(3500).fadeOut(1500, function() {
$('#pic3').fadeIn({queue: false, duration: 'slow'}).animate({ top: "-100px" }, 'slow').delay(3500).fadeOut(1500, function() {
});
});
});
}
I'm running into two issues:
1) when the slide restarts, it looses it's slide up animation.
2) I don't know how to add a blank one second delay before starting each image.
I hope someone here can help me! Sorry if the code is not the cleanest, this is my first time working with image animations.
Messed with your timings slightly to speed it up. Important points are
to reset positions
and
to delay start / between repeats.
Based on your JSFiddle...