开发者

IE7 Animated GIF Appears as a Static Image?

开发者 https://www.devze.com 2022-12-27 14:45 出处:网络
After a button is clicked to start a process on my web app, I show a small loading gif (animated) that rotates to indicate to the user something is happening. I put the gif img in place of the button

After a button is clicked to start a process on my web app, I show a small loading gif (animated) that rotates to indicate to the user something is happening. I put the gif img in place of the button like this using JQuery:

$('#btn_holder').html('<img src="images/loading2.gif" style="margin-left:40px; margin-top:7px;" />');

This works great in all browsers (Firefox, IE8, Chrome) except IE7 on a windows server 2003.

In IE, the gif appears but it is not animated. What's going on with IE7? How can I test what the problem 开发者_开发问答is?

Thanks all


Maybe it's a problem with your IE7, (this happened to me before)

To enable animated GIFs, select "Internet Options" from the Tools menu and then click the Advanced tab. Scroll down to the Multimedia section, check the "Play Animations" option and click OK. From now on, you should only see the first frame of each animated GIF that loads.

Remember that IE will need to be restarted for the changes to take effect.

Other than that, there's a couple of solutions here: IE7's inanimate gifs.


Does this happen for all animated gifs or only animated gifs loaded in by Javascript? Try going to the url for the gif and seeing if it is animated then. If it is then instead of loading the image into the button, why not load it in HTML, hide it with CSS visibility:hidden and then unhide it with Javascript?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号