Is there a way to grow/shrink an image on hover using Jquery?
<p>Is there a way, using Jquery to grow and then shrink an image (with animation so it looks smooth) on hovering without affecting the layout too much (I'm assuming the padding would have to shrink and then grow as well).</p>

<hr>

<p>With a bit of messing around, I finally came up with the solution, thanks to everyone who helped out.</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;style type="text/css"&gt; 
    .growImage {position:relative;width:80%;left:15px;top:15px}
    .growDiv { left: 100px; top: 100px;width:150px;height:150px;position:relative }
&lt;/style&gt;

&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"&gt;&lt;/script&gt;

&lt;/head&gt;
&lt;body&gt; 
&lt;div class="growDiv"&gt; 
      &lt;img class="growImage" src="image.jpg" alt="my image"&gt; 
&lt;/div&gt;

&lt;script type="text/javascript"&gt;

$(document).ready(function(){

    $('.growImage').mouseover(function(){
      //moving the div left a bit is completely optional
      //but should have the effect of growing the image from the middle.
      $(this).stop().animate({"width": "100%","left":"0px","top":"0px"}, 400,'swing');
    }).mouseout(function(){ 
      $(this).stop().animate({"width": "80%","left":"15px","top":"15px"}, 200,'swing');
    });;
});
&lt;/script&gt;
&lt;/body&gt;&lt;/html&gt;
</code></pre>
