Image is jumping before setting the aspect ratio on animation completion
<p>Hi I have the below function , after clicking the imagelist the poupupimg gets animated.
the problem for me is, i am having html in sethtml which is large image.Once the animation is over i call updateimagedimensions and set the width and height by maintaining aspect ratio</p>

<p>The problem for me is if the internet is too slow , the image jumps out of the div, to fix that i gave the minwidth and height while setting the html , but in this case
updateImageDimesions is unable to overwrite width and height after animation.</p>

<p>I cannot post the complete code , i am just posting the pseudo code. can you please
let me know what is the issue.</p>

<p>This is happening only in firefox and chrome, ie works fine. </p>

<p>$('.ImageList').live('click', function () {<br>
        $('#popupImg').animate({
            opacity: 0.02,
            left: '-=15'
        }, 50, function () {
           updateImageDimensions();
        });
    SetHtml();<br>
    });</p>

<p>function sethtml();
{
 if i give default width and height here..// updateImageDimensions is not working
 ' 
}</p>

<p>function updateImageDimensions()
{
  Logic used for maintaining aspect ration.<br>
  use logic to set the height and width of the image.  </p>

<p>}</p>
