Monday, March 30, 2009

[jQuery] How to access variable outside function

i sometimes do something like

var i;
$.getJSON("url", function (json) {
// update i
i = json.var;
});

how can i access the updated i outside the function(json)...?

No comments: