Hi, Is there a way to take the JSON from a $.getJSON() call and assign it to a var in the global scope?
i tried the following but it didn't work: var globalX; function foo() { $.getJSON("jsondata.js",function(data){ globalX = data; }); } thanks
Hi, Is there a way to take the JSON from a $.getJSON() call and assign it to a var in the global scope?
i tried the following but it didn't work: var globalX; function foo() { $.getJSON("jsondata.js",function(data){ globalX = data; }); } thanks