Get the height of a menu on page load
<p>I'm trying to set a menu, and with:</p>

<pre><code>var headed = $('#menu-main_menu li');
headed.hover(
    function() {
        var subed  = $(this).find('ul.sub-menu').height();
        var headwi = $(this).width();
        $(this).find('ul.sub-menu').css({'top': -subed, 'width': headwi }).show();
    }, 
    function() {
        $(this).find('ul.sub-menu').hide();
        return false;
    }
);
</code></pre>

<p>Here is a jsfiddle example : <a href="http://jsfiddle.net/moabi/VDZYV/2/" rel="nofollow">http://jsfiddle.net/moabi/VDZYV/2/</a>
and as you can see, it doesn't get the height on the first shot. What did i do wrong ?
(the menu is at the bottom of the page, so I want the sub-menu to go up, this is why i put the negative value)
thank you</p>
