Jquery - Grab Variable from Another Function
<p>I have two functions on my page. I am trying to find a way to access a variable in function 1 inside function 2:</p>

<pre><code>$(function() {
    $('a[id=1]').live("click", function(event) {
        event.preventDefault();
        var Var1 = "something1";
       });
});

$(function() {
    $('a[id=2]').live("click", function(event) {
        event.preventDefault();
        var Var2 = event.var1;
       });
});
</code></pre>

<p>So i am usre my above is incorrect but you can see how in function 2 i am trying to grab a variable from the first function.  Is there any way i can do this.  I don't know why but i keep thinking it has something to do with the event.var1 or the event functionality.  Any help would be appreciated.  Thank you.</p>
