I have some code that does this:
function A(){
$.ajax({
...blah blah...
success: function(data){
return data;
});
}
and then I'm trying to use the data later:
var x = A();
x.doSomething();
but x is never stored, since A() takes a while. Is there any way to avoid this?