jQuery outerHeight for hidden element
<p>I am having a problem with getting the outer height of a list item - similar to the below post:
<a href="http://stackoverflow.com/questions/2345784/jquery-get-height-of-hidden-element-in-jquery-1-4-2">jQuery: Get height of hidden element in jQuery 1.4.2</a></p>

<p>Here is my code:</p>

<pre><code>function tabload() {
    $('.tab li:first-child').addClass('selected');

    $(".tab ul").css({ 'position': 'absolute', 'visibility': 'hidden', 'display': 'block'});

    var h = $(".tab ul").outerHeight(true);

    $(".tab ul").css("height", h);

    $(".tab ul").css({'position': 'relative', 'visibility': 'visible', 'display': 'none' });
};
</code></pre>

<p>Am i doing something wrong?</p>
