JQuery image gallery non functional fade effects
Posted
by
Robin Knight
on Stack Overflow
See other posts from Stack Overflow
or by Robin Knight
Published on 2011-06-30T14:09:17Z
Indexed on
2011/07/01
0:22 UTC
Read the original article
Hit count: 201
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?
© Stack Overflow or respective owner