I have an animated gif that lets the user know a page is loading. The GIF does not animate in IE7. After some troubleshooting I know the problem can be caused by
- Preload event loading images in body tag (not the case).
- An IE Setting in Tools > Internet Options > Advanced tab > Multimedia section > "Play animations in webpages*" should be checked. It is checked
.
The GIF still does not animate. I created a webpage.
This animates in IE7:
<div>
<img src="images/ajax-loader.gif" alt="Loading..." />
</div>
This does not animate in IE7
jQuery
$('.searchButton').click(function () {
$("#divLineItemComments").dialog("open");
});
ASP.NET
<asp:Button ID="searchBtn" Text="Search" class="search_btn searchButton"
runat="server" onclick="searchBtn_Click" />
<div id="divLineItemComments" style="display:none;clear:both;text-align:center;">
<div>
<img src="images/ajax-loader.gif" alt="Loading..." />
</div>
</div>
ASP.NET Code Beside
protected void searchBtn_Click(object sender, EventArgs e)
{
Thread.Sleep(2000);//simulate work
Response.Redirect("Animate.aspx");//redirect back to current page to complete POST
}
Dropping the dialogue code out entirely and instead using div.Show() also fails
$('.searchButton').click(function () {
$("#divLineItemComments").show();
});
So this tells me the issue is most likely with jQuery. The issue occurs in IE7, not firefox 4. How can I fix it? Maybe jQuery pre-loads images in the background...I dunno..?