Wednesday, 28 August 2013

How to reset an image element's width?

How to reset an image element's width?

When I load an image dynamically, it has the correct dimensions. However,
when I scale the image I manually set the width and height values of the
image.
When I load another image, the values are retained from the previous image
and it is deformed. I need to make the element think has no width/height
values so it will take the dimensions of the src I set it to.

No comments:

Post a Comment