var cnt = 0; function reloadData() { $.get('/fragments/sampletime.html', function(data) { $('#dateTime').replaceWith(data); }); $.get('/fragments/temperature.html', function(data) { $('#temperature').replaceWith(data); }); $.get('/fragments/wind.html', function(data) { $('#winds').replaceWith(data); }); $.get('/fragments/current.html', function(data) { $('#current').replaceWith(data); }); $.get('/fragments/almanac.html', function(data) { $('#almanac').replaceWith(data); }); if (cnt > 5) { $('#temppie').attr("src", "/image/temppie.png?timestamp=" + new Date().getTime()); $('#temphumidchart').attr("src", "/image/temphumidchart.png?timestamp=" + new Date().getTime()); $('#windchart').attr("src", "/image/windchart.png?timestamp=" + new Date().getTime()); $('#sunchart').attr("src", "/image/sunchart.png?timestamp=" + new Date().getTime()); $('#outdoor').attr("src", "/image/Outdoor.jpg?timestamp=" + new Date().getTime()); cnt = 0; } else { cnt += 1; } $.get('/fragments/forecast.txt', function(data) { $('#forecast').html(data); }); $.get('/fragments/summary.html', function(data) { $('#weathersummary').replaceWith(data); }); $.get('/fragments/metar.html', function(data) { $('#metar').replaceWith(data); }) } setInterval("reloadData()", 60000);

