Pass variable between functions
<p>I have the following line of code that is executed inside the <code>$(document).ready</code>:</p>

<pre><code>$('#sliding_menu_area').toggle(effect, reAlign);
</code></pre>

<p><code>reAlign</code> is a function that is declared outside of the <code>$(document).ready</code> main function in my <code>.js</code> file.</p>

<p>I have a variable called <code>tag</code> that is declared also inside the <code>$(document).ready</code> and I need to pass the variable to the <code>reAlign</code> function. I tried </p>

<pre><code>$('#sliding_menu_area').toggle(effect, reAlign(tag));
</code></pre>

<p>but it didn't work. Can I declare the <code>tag</code> variable as a global so functions declared outside of <code>$(document).ready</code> to be able to access it? So far the functions declared inside the <code>$(document).ready</code> can access it just fine.</p>

<p>Any ideas?</p>
