how to get a variable over to a function?
<p>i want to get a variable (which is set when a link is clicked) over to a function and show it as a pop out.</p>

<p>the code as shown below:</p>

<pre><code>$('a#link1').click(function(e){
e.preventDefault();
    var value = 'true';
});


function exe(){
    alert(value);
}
</code></pre>

<p>when the function is executed , all i get is value is undentified.</p>

<p>So anyone knows a way around it? </p>
