Jquery.height() returns different results usign F5 or CTRL+F5
<p>So I am trying to find the height of my images then add a top margin this enables me to impose a a vertical center.</p>

<p>I'm running this code, and on an <strong>F5 refresh</strong> I get correct height but on <strong>CTRL+F5 refresh</strong> it gives me a much smaller height. I kind of assume this is a loading/delay thing, but I am using document ready so not really sure whats going on. I tried using a php function but it slows the site down amazingly so have to stick with jquery. </p>

<p>you can see it working here. <a href="http://www.mzillustration.com" rel="nofollow">www.mzillustration.com</a></p>

<pre><code> jQuery(document).ready(function() {

 if (jQuery('.imagedisplay').length != 0) {
                jQuery('.imagedisplay').each(function(){ 

                var imgheight = jQuery(this).find('img').height();

                var topmarg = ((240 - imgheight) / 2) ; 

                jQuery(this).find('img').css({'margin-top':topmarg+'px'});



            });

});
</code></pre>

<p>any ideas/help/explanation much appreciated. 
thanks</p>
