Storing element height in var via jquery
<p>EDIT:</p>

<p>Here is the code exactly as it is in my file:</p>

<p>Relevant HTML:</p>

<pre><code>&lt;a href="javascript:void(0);" onmouseover="return overlib('Farewell - N.C. Hunter Hayden', HEIGHT, -1, WIDTH, -1, ABOVE);" onmouseout="return nd();" onclick="andherewego(1); setTimeout(function(){document.getElementById('farewell').play();},965);"&gt;&lt;div id="note_1"&gt;&lt;/div&gt;&lt;/a&gt;
</code></pre>

<p>Clicking this will call the function andherewego(p).  Here is that function:</p>

<pre><code>function andherewego(p){    // p is the # of the note pressed

initiatestafffade();    // set times for notes and notation to fade,
                        // and fades them
setTimeout(function(){
    changingoftheguard(p);  // show writing_p, paper, marginline,
                            // back_p
    hackemoff(p);           // re-define height for paper, marginline,
                            // back
    hidingfromjudgement(p); // determines how many covers to show and
                            // shows
                            // them
    nowheretohide(p);       // set times for covers to fade, and fades
                            //them

}, 950);
</code></pre>

<p>}</p>

<p>This function calls hackemoff(p), which I have put below:</p>

<pre><code>function hackemoff(p){
var writingheight = $("writing_"+p).height();
alert(writingheight);
$("#paper").height(writingheight-300+50);
$("#marginline").height(writingheight+50);
$("#back_"+p).height(writingheight+50);
</code></pre>

<p>}</p>

<p>That is the code.  If my syntax is indeed flawless, as you say, for the line</p>

<pre><code>    var writingheight = $("writing_"+p).height();
</code></pre>

<p>then I do not understand why writingheight is null.  I am grateful for you to be looking at this.</p>

<p>ORIGINAL POST:</p>

<p>I am trying to store the value of an element's height in a variable, so I can use it to set the height of other elements.  My issue is  with storing the height.  I thought I could try this:</p>

<pre><code>var writingheight = $("#writing_"+p).height;
</code></pre>

<p>(There are several div#writing_<em>x</em> elements.)</p>

<p>Why does this store a long mess in <code>writingheight</code> instead of the height value?</p>
