Determine final size of element wrapper before jQuery effect (e.g. slideDown)
<p>Can anyone tell me if (and how) jQuery determines the final size of an element that is animated with the built-in effects functions like <code>slideDown()</code>?</p>

<p>To give a practical example <a href="http://jsfiddle.net/GgCLa/" rel="nofollow">http://jsfiddle.net/GgCLa/</a>:</p>

<p>CSS:</p>

<pre><code>#wrapper { display: block; }

#wrapper p {
     display: none;   
}

#wrapper p:first-child {
     display: block;   
}
</code></pre>

<p>HTML:</p>

<pre><code>&lt;div id="wrapper"&gt;
    &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
       Curabitur et quam urna, ultrices commodo odio.&lt;/p&gt;
    &lt;p&gt;Nulla at tellus augue, varius dignissim nunc. Donec mattis
       est quis sem iaculis scelerisque. .&lt;/p&gt;
&lt;/div&gt;
&lt;input type="button" name="button" id="button" value="Clickey" /&gt;
</code></pre>

<p>JAVASCRIPT:</p>

<pre><code>$(document).ready(function() {
    $("input").toggle(
        function() { $("#wrapper p:last").slideDown("fast"); },
        function() { $("#wrapper p:last").slideUp("fast"); }
    );
});
</code></pre>

<p>Is there a way to determine the final height of the wrapper before the animation has completed?</p>
