jQuery expand image

pass target dimensions by reference

by Bodhiji

HTML

<div style="display:inline-block;background:#701;padding: 0 !important;">
    <img id="boo" style="border:12px solid #080;" src="http://www.afinerweb.com/images/bluehost.jpg">
</div>

JavaScript

var endWidth = 600;
var endHeight = 300;
endWidth = endWidth.toString() + 'px';
endHeight = endHeight.toString() + 'px';
var $ = (jQuery);
$('#boo').animate({
    height: endHeight,
    width: endWidth
}, 750);