Passing Parameters to a jQuery 'Load'
<p>I have some script on my page which is:</p>

<pre><code>$('#divMenuHolder').load('../menu.html');
</code></pre>

<p>However I also need to be able to pass some parameters which are acted on the menu.html page.</p>

<p>I've tried the following:</p>

<pre><code>$('#divMenuHolder').load('../menu.html?opt1=test&amp;opt2=test2');
</code></pre>

<p>However when I come to get the parameters using the following function:</p>

<pre><code>function getUrlVars()
{
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&amp;');
    for(var i = 0; i &lt; hashes.length; i++)
    {
        hash = hashes[i].split('=');
        vars.push(hash[0]);
        vars[hash[0]] = hash[1];
    }
    return vars;
}
</code></pre>

<p>It returns nothing because it's trying to get the parameters of the page itself, and not the page I'm loading into DIV.</p>

<p>Can anyway assist in guiding me to what I want please?</p>
