JQuery image gallery non functional fade effects
- by Robin Knight
Here is a simple image gallery script for fading in and out divs with background images. It is slow and not working properly.
It would appear all images are appearing and disappearing together without any animation
This gallery should fade each image out into the next one
function gallery() {
timerp = window.setInterval(function() {
$('.cornerimg').fadeOut(2000);
if ($('.cornerimg:visible') == $('.cornerimg').last()) {
$('.cornerimg').first().fadeIn(2000);
} else {
$('.cornerimg').next().fadeIn(2000);
};
}, 6000);
}
}
Any ideas what has gone wrong with it?