Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery / JS animation screwed up (Firefox/IE)
    primarykey
    data
    text
    <p>edit:</p> <p>Problem seems not to be limited to IE, see my answer post below for a testcase.</p> <p>Hello, I am rotating between 3 different background images on a logo:</p> <pre><code>$(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); }); </code></pre> <p>bg1 to bg3 have the following styles:</p> <pre><code>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; } </code></pre> <p>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. </p> <p>In IE the image does change, but it does not properly fade out / in...</p> <p>When running it through IETester, I continuously get the hour glass cursor as if it is downloading the background image on the fly... </p> <p>Can anyone help me with this?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload