I need to do two different JSON requests and combine those requests in one function. I would have liked to use the following construction:
$.when(
$.getJSON(url1),
$.getJSON(url2)
).done(function(data1, data2) {
someFunction(data1, data2);
});
Unfortunately, for this project we are using jQuery 1.4 and $.when was introduced since jQuery 1.5. Is there some equivalent for this in jQuery 1.4?
Thanks in advance!