I tried to add the different images with fadeIn and fadeOut Option. Right Now that Script makes continuously looping. But i want to make that stop the loop once it ends the last of the image and alert. That's it. I am not sure how can i do this inorder to get alert for end of the loop.
$('document').ready(function() {
var $imgs = $('#slideshow > img'), current = 0;
var nextImage = function() {
if (current >= $imgs.length) current = 0;
$imgs.eq(current++).fadeIn(function() {
$(this).delay(3000).fadeOut(nextImage);
})
};
nextImage();
});