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.
Examples
$.fn.getRedemptionID = function(){
var myVar = data.DATA[0].item1;
}
1) Global variables are bad.
2) Yes: