Im running a loop of different animation sequences and at some point I want to add a GIF animation. Appending the GIF to a div works fine the first time, however in my second loop I can't seem to get "reloading" of the GIF to work in Explorer.
function toggleGifAnimation() {
if(loopCount == 1) { //in my first loop I create the img and append it to the HTML
imgContainer = document.createElement("img");
imgUrl = "assets/myGIFanimation.gif";
imgContainer.src = imgUrl;
myDiv.appendChild(imgContainer);
myDiv.style.display = "block";
} else { //each other loop I try to re-use and "reload"
//THIS DOESNT SEEM TO WORK IN EXPLORER
imgContainer.src = "";
imgContainer.src = imgUrl;
}
}
This seems to be working in Firefox + Chrome though.
EDIT 1: I've found suggestions on adding a random number at the end of the src, however that will cause reload of the entire file size again. And seeing this gif animation is quite a few mbs, then that won't work :(