(function ($) {
//"use strict";
function loadWeather(location, woeid) {
$.simpleWeather({
location: location,
woeid: woeid,
unit: 'f',
success: function (weather) {
html = '
';
html += '
';
html += '
' + weather.currently + '
';
html += '
' + weather.forecast[0].day + ', ' + weather.forecast[0].date+ '
';
html += '
';
html += '';
html += '
' + weather.city + ' '+ weather.region + '
';
html += '
' + weather.alt.temp + '°C
';
html += '
';
html += '';
html += '
' + weather.forecast[1].day + ' ' + weather.forecast[1].alt.high + '° ' + weather.forecast[1].alt.low + '°
';
html += '
' + weather.forecast[2].day + ' ' + weather.forecast[2].alt.high + '° ' + weather.forecast[2].alt.low + '°
';
html += '
' + weather.forecast[3].day + ' ' + weather.forecast[3].alt.high + '° ' + weather.forecast[3].alt.low + '°
';
html += '
' + weather.forecast[4].day + ' ' + weather.forecast[4].alt.high + '° ' + weather.forecast[4].alt.low + '°
';
html += '
' + weather.forecast[5].day + ' ' + weather.forecast[5].alt.high + '° ' + weather.forecast[5].alt.low + '°
';
html += '
';
$("#weather-one").html(html);
},
error: function (error) {
$("#weather-one").html('' + error + '
');
}
});
}
// init
loadWeather('New York City', '');
})(jQuery);
(function ($) {
//"use strict";
function loadWeather(location, woeid) {
$.simpleWeather({
location: location,
woeid: woeid,
unit: 'f',
success: function (weather) {
html = ' ' + weather.temp + '°' + weather.units.temp + '
';
html += '' + weather.city + ', ' + weather.region + '
';
html += '' + weather.currently + '
';
html += '' + weather.alt.temp + '°C
';
$("#weather-two").html(html);
},
error: function (error) {
$("#weather-two").html('' + error + '
');
}
});
}
// init
loadWeather('New York City', '');
})(jQuery);
(function ($) {
//"use strict";
function loadWeather(location, woeid) {
$.simpleWeather({
location: location,
woeid: woeid,
unit: 'f',
success: function (weather) {
html = ' ' + weather.temp + '°' + weather.units.temp + '
';
html += '' + weather.city + ', ' + weather.region + '
';
html += '' + weather.currently + '
';
html += '' + weather.alt.temp + '°C
';
$("#weather-three").html(html);
},
error: function (error) {
$("#weather-three").html('' + error + '
');
}
});
}
// init
loadWeather('Sydney', '');
})(jQuery);
(function ($) {
//"use strict";
function loadWeather(location, woeid) {
$.simpleWeather({
location: location,
woeid: woeid,
unit: 'f',
success: function (weather) {
html = ' ' + weather.temp + '°' + weather.units.temp + '
';
html += '' + weather.city + ', ' + weather.region + '
';
html += '' + weather.currently + '
';
html += '' + weather.alt.temp + '°C
';
$("#weather-four").html(html);
},
error: function (error) {
$("#weather-four").html('' + error + '
');
}
});
}
// init
loadWeather('New York', '');
})(jQuery);