I have a few lines of code:
var url = \'http://api.spitcast.com/api/spot/forecast/1/\';
var url_wind = \'http://api.spitcast.com/api/county/wind/orange-count
you cannot, use two separate calls:
$.getJSON(url, function (data) {
$.getJSON(url_wind, function (data2) {
//do stuff with 'data' and 'data2'
});
});
Example above will execute the second call (to url_wind) when the first call (to url) has finished. To execute the two calls in parallel, use $.when() like this:
$.when($.getJSON(url), $.getJSON(url_wind)).done(function(data1, data2) {
//do stuff with 'data' and 'data2'
});