Calculate a div's height with jQuery - minus header and footer
<p>I'm using a sticky footer (negative margin solution) and it works fine. What I need to do is calculate the window's height, subtract the known height of the header and footer then apply that number and use it for the height of the main wrapper div. CSS solutions cause other issues, is there a good way to do this?</p>

<pre><code>var h = window.height();
var k = 300; //header is 100px footer is 200px
$('#wrap').height(h-k);
</code></pre>

<p>rough idea, pls help.</p>
