edit:
Problem seems not to be limited to IE, see my answer post below for a testcase.
Hello, I am rotating between 3 different background images on a logo:
$(function() {
function Animate_2() {
$("div#bg1" ).animate({opacity: 0 }, 2000);
$("div#bg2").animate({opacity: 100}, 2000);
setTimeout(Animate_3, 5000);
}
function Animate_3() {
$("div#bg2").animate({opacity: 0 }, 2000);
$("div#bg3").animate({opacity: 100}, 2000);
setTimeout(Animate_1, 5000);
}
function Animate_1() {
$("div#bg3").animate({opacity: 0 }, 2000);
$("div#bg1").animate({opacity: 100}, 2000);
setTimeout(Animate_2, 5000);
}
/* Start it */
setTimeout(Animate_2, 5000);
});
bg1 to bg3 have the following styles:
div#bg1 {
height: 159px;
width: 800px;
margin-left: auto;
margin-right: auto;
background-image: url('images/bg_1.jpg');
background-repeat: no-repeat;
background-position:center center;
position: relative;
z-index: 3;
}
div#bg2 {
height: 159px;
width: 800px;
margin-left: auto;
margin-right: auto;
background-image: url('images/bg_2.jpg');
background-repeat: no-repeat;
background-position:center center;
position: relative;
z-index: 2;
margin-top: -159px;
}
div#bg3 {
height: 159px;
width: 800px;
margin-left: auto;
margin-right: auto;
background-image: url('images/bg_3.jpg');
background-repeat: no-repeat;
background-position:center center;
position: relative;
z-index: 1;
margin-top: -159px;
}
IE does it just fine for the first animation, bg1 nicely fades out while bg2 fades in... After that first perfect transition it screws up in IE (all versions!) while it works just fine in Firefox, Chrome, Safari and Opera.
In IE the image does change, but it does not properly fade out / in...
When running it through IETester, I continuously get the hour glass cursor as if it is downloading the background image on the fly...
Can anyone help me with this?