Dynamically change an element's top position based on height
<p>I have three divs that are set to popup on li:hover using CSS. I want these divs to hover at the same level above their parent li regardless of the height of their content. In order to do so, I'm trying to use jquery to calculate the div's height, then set a negative top value equal to the height of the div. Here's what I have so far:</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function() {
var pHeight = $('footer ul ul').height(); //Get height of footer popup
var nHeight = pHeight + "px"; //Calculate new top position based on footer popup height

        $('footer ul ul').css({ //Change top position to equal height of footer popup
            'top' : "-nHeight",
    });
});
&lt;/script&gt;
</code></pre>

<p>Firebug keeps telling me that there was an error parsing the value for top and the declaration was dropped. Any thoughts?</p>
