0

I want to show an animated gif when the user searches a term and the page is redirected to the results page. The problem is that the animated gif freezes while the redirection happens. Is there a workaround for this? Maybe css3 animations instead of an animated gif?

Thanks.

codelove
  • 1,988
  • 5
  • 26
  • 36

1 Answers1

0

A hack to get around this is to set the image to "reload" every few milliseconds. This gives the effect that the gif is still animating.

setTimeout('document.images["myImageId"].src="../images/ajax-loader.gif"', 200);
Dave Zych
  • 21,581
  • 7
  • 51
  • 66