Thursday, January 15, 2015

GIF Animations in Internet Explorer

Internet Explorer(IE) has an inherent problem with animating .gif images which are originally hidden.
The reason is that IE loads the .gif but does not start the animation when it is hidden.
Unfortunately the animation does not start when it made visible thus appearing to be frozen.

A small workaround for this issue is to reset the images source to itself after it has been displayed on the page.

function UpdateImg(ctrl) {
var img = document.getElementById(ctrl);
img.src = img.src;

No comments:

Post a Comment