Прошу прощения, если это очевидно, но я просто возиться и взламывать, когда дело доходит до кодирования чего-либо. Я пытаюсь создать страницу отображения погоды и получил все, как я ее хочу, но высокий и низкий за день, похоже, застрял в данных за день, когда страница была создана и не обновилась за два дня с тех пор , Есть ли что-то, что мне не хватает, чтобы получить эти данные?Неверные/устаревшие высокие/низкие темпы в simpleweather.js
Вот код JS:
if("geolocation" in navigator) {
navigator.geolocation.getCurrentPosition(function(position) {
loadWeather(position.coords.latitude + ',' + position.coords.longitude);
});
} else {
loadweather("Danville, KY", "");
}
$(document).ready(function() {
setInterval(getWeather, 60000);
});
function loadWeather(location, woeid) {
$.simpleWeather({
location: location,
woeid: 2389342,
unit: 'f',
success: function(weather) {
city = weather.city;
temp = weather.temp+'°';
wcode = '<img class="weathericon" src="images/weathericons/' + weather.code + '.svg">';
high = '<p>Today\'s High: '+weather.high+'°'+weather.units.temp+'</p>' ;
low = '<p>Today\'s Low: '+weather.low+'° '+weather.units.temp+'</p>';
$(".location").text(city);
$(".temperature").html(temp);
$(".climate_bg").html(wcode);
$(".high").html(high);
$(".low").html(low);
},
error: function(error) {
$(".error").html('<p>' + error + '<p>');
}
});
}
Что такое 'getWeather'? –