tags:

views:

17

answers:

0

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

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.

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

This is happening only in firefox and chrome, ie works fine.

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

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

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

}