See, it works: http://jsfiddle.net/Q2Y6s/
You have to put your code in the success-part:
$(document).ready(function () {
$.simpleWeather({
zipcode: '',
woeid: '2357536',
location: '',
unit: 'f',
success: function (weather) {
html = '<h2>' + weather.tomorrow.high + '°' + weather.units.temp + '</h2>';
html += '<ul><li>' + weather.city + ', ' + weather.region + '</li>';
html += '<li class="currently">' + weather.tomorrow.forecast + '</li>';
html += '<li>' + weather.tomorrow.highAlt + '°C</li></ul>';
$("#weather").html(html);
/************************** your code HAS TO BE here ************************/
if(weather.tomorrow.code > 16) {
$("#weather").html('<h1>Alert: Freezing Rain!</h1>');
}
else {
$("#weather").html('<h1>Alert: Freezing Rain!</h1>');
}
},
error: function (error) {
$("#weather").html('<p>' + error + '</p>');
}
});
/************************** your code was here ************************/
});