global variable in jquery
<p>In jQuery is it possible to create a function that sets a variable which I can then access in another function. i.e. I need a global variable that can be accessed anywhere on the page. </p>

<p>Examples</p>

<pre><code>$.fn.getRedemptionID = function(){
  var myVar = data.DATA[0].item1;
}
</code></pre>
