JQuery method execution order?
<p>I am trying to use the below to load data from a specific <code>&lt;div&gt;</code> from a page that contains <code>&lt;ul&gt;&lt;li&gt;</code> structure into a <code>&lt;div&gt;</code> on this page.  What is currently happening is that it "seems" to try and load the menu before the data is there.  I say this because my menu pops up on the page first with a <code>NULL</code>, which is the default, and THEN the list I was expecting gets populated into <code>&lt;div id="hierarchy"&gt;</code> under my empty Fly Out Menu. </p>

<p>I am new to <strong>JQuery</strong> so hopefully this is a simple, ignorant, mistake.</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function(){
    $('div.ms-quickLaunch').replaceWith('&lt;div id="hierarchy" style="border:solid 1px white; width:0px;"&gt;&lt;/div&gt;');
    });

$(function(){
            $('#hierarchy').load('http://wwcshare/icenter/Pages/wwcMenuContent.aspx #menuContent'); // grab content from another page
            $('#hierarchy').menu({
                    autoShow: true,
                    content: $('#hierarchy').next().html(),
                    backLink: false,
                    crumbDefaultText: ' '
                });         
        });
&lt;/script&gt;
</code></pre>
