Setting DIV width based on child image
<p>I am trying to set DIV width based on the child image. This code below works if there is only one DIV. When there are more, it will only use the width of the first child image (first DIV).</p>

<pre><code>$('.img_thumb').each(function(){
   $('img').load(function(){
      var img_width = $('.img_thumb img').width();
      $('.img_thumb').css('width', img_width + 'px');
   });
});
</code></pre>

<p>Any help would be appreciated. Thanks</p>
