JQuery animation freezes in ie8

I have a jQueryUI animation combined with some jQuery code that adds some html to the page. Html is created based on data from a jQuery Ajax call.

I thought that freezing my animations might be caused by an Ajax call, but from what is said below, I don't think:

Why does my GIF counter stop when a jQuery ajax call is made?

I think that the problem I have may have the same origin, however the above question gives the REASON for the behavior, not the SOLUTION.

Anyone have a solution?

0
source share
2 answers

, , "" ; , .

  • . .hide(), .
  • , html div
  • . ie8/firefox/chrome; , . firefox, , ie8.

, , , , .

0

.

HTML :

<span id='myHiddenDiv' style='display: none'>
  <img src='' id='myAnimatedImage' align='absmiddle'>
</span>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" OnClientClick="showDiv();" Text="Search" />

( div, ), img-. OnClientClick "showDiv();" client script, :

<script language='javascript'> 
  function showDiv() 
  {
    document.getElementById('myHiddenDiv').style.display =""; 
    setTimeout('document.images["myAnimatedImage"].src="work.gif"', 200); 
  } 
</script>

setTimeout, DOM reset src 200 . , , , , , - , .

0

All Articles