JSFiddle - React, Tailwind, and code Playground
HTML
<div id="container">
<img src="http://upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Logo_Google_2013_Official.svg/750px-Logo_Google_2013_Official.svg.png">
</div>
CSS
img {
max-width:100%;
max-height:100%;
}
#container {
width:200px;
height:200px;
}
JavaScript
$('#container').click(function () {
var _this = $(this),
enlarged = _this.data('enlarged') || 0;
_this.stop(true, false).animate({
width: enlarged ? 200 : 400,
height: enlarged ? 200 : 400,
left: 90,
top: 90
}, 200);
_this.data({ enlarged: !enlarged });
});