jQuery - div resizing script works correctly when navigating within the site but not on reload?
<p>I have a really weird bug and cant figure out why things are not working consistently.</p>

<p>I have two content divs, eaither one of them could be shorter than the other.</p>

<p>I have a script that checks to see which one is taller, and then I make the other equal it.</p>

<p>It works when i click around within the site, so say I click on "Next" or click on a page link direcly, the script works like it should.</p>

<p>If i go to the page directly via my browser address bar, or if i refresh the page, it doesn't do it. Why on earth?!</p>

<p>here is the script:</p>

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

var getCreditsHeight = $("#project_credits").outerHeight()-30;
var getDescriptionHeight = $("#project_description").outerHeight()-30;

if ( getCreditsHeight &gt; getDescriptionHeight ) {
    $("div#project_description").height(getCreditsHeight);
} else {
    $("div#project_credits").height(getDescriptionHeight);
};
}); 
}); 
</code></pre>

<p>As you can see it's on document ready.</p>

<p>If I load a new page, then click onto the page in question for the first time, it also does it. but if i go back to the homepage and then click in again, it works...</p>

<p>Thanks,
Marc</p>
