Change image based on wrapper height
<p>I am trying to write a script that looks at the height of all the postInside wrappers on a page. If the height of each individual wrapper is less than 320px, I want to add a style to an image within that particular wrapper.  </p>

<p>Here is my code.  Any feedback would be great.  </p>

<pre><code>jQuery('div.postInside').each(function(){
  var div = jQuery('div.postInside').height();
  var wrapper = jQuery('div.postInside');
  if (div &lt; 320){
    jQuery('p.imageCenter img').attr('style','max-width:250px !important');
    delete wrapper;
    delete div
   }
});
</code></pre>
