I have to update the image height and width after dynamically loading a new thumb. I’m currently doing it like so:
...
$('#thumb_' + newID).attr('width', 120);
$('#thumb_' + newID).attr('height', 120);
$('#thumb_' + newID).attr('src', data.thumb + '?v=' + ( new Date() ).getTime());
It seems like the height and width are always getting set but the image doesn’t always fit the dimensions specified.
Is there a better more reliable way to do this?
try this; with the css function instead of the attr function after changing the source