Writing this problem on the forum forced me to really think hard what exactly goes wrong and why. Now I have the sollution: set the timeout for the next image in the slideshow in the callback function of .fadeOut(), in stead of calling it after calling .fadeOut().
- // Old
- $('#cloud_new').fadeOut(500);
- setTimeout('cloud_animate()', 10000);
- // New
- $('#cloud_new').fadeOut(500, function() {
- setTimeout('cloud_animate()', 10000);
- });
Now there aren't several fadeOut actions that still need to complete when you switch back to the background tab. Problem solved.