(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-one").html(html);
},
error: function (error) {
$("#weather-one").html('' + error + '
');
}
});
}
// init
loadWeather('New York', '');
})(jQuery);