Skip to content

Commit d68db27

Browse files
committed
fix deg symbol
1 parent 71c04f6 commit d68db27

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

js/wmain.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ weatherForecast.onload = function () {
7878
const day1 = weekday[dayWeek]; console.log(`day1 is ${day1}`);
7979
let day2, day3;
8080
document.getElementById('r1c1').innerText = day1;
81-
document.getElementById('r1c3').innerText = Math.round(fObj.list[0].main.temp) + "°";
81+
document.getElementById('r1c3').innerHTML = Math.round(fObj.list[0].main.temp) + "°"; // innterHTML required to render deg!
8282
document.getElementById('r1c2').src = "https://openweathermap.org/img/w/" + fObj.list[0].weather[0].icon + ".png";
8383
document.getElementById('r1c2').alt = fObj.list[0].weather[0].description;
8484
document.getElementById('r1c2').title = fObj.list[0].weather[0].main;
@@ -91,7 +91,7 @@ weatherForecast.onload = function () {
9191
}
9292
console.log(`day2 is ${day2}`);
9393
document.getElementById('r2c1').innerText = day2;
94-
document.getElementById('r2c3').innerText = Math.round(fObj.list[8].main.temp) + "°";
94+
document.getElementById('r2c3').innerHTML = Math.round(fObj.list[8].main.temp) + "°";
9595
document.getElementById('r2c2').src = "https://openweathermap.org/img/w/" + fObj.list[8].weather[0].icon + ".png";
9696
document.getElementById('r2c2').alt = fObj.list[8].weather[0].description;
9797
document.getElementById('r2c2').title = fObj.list[8].weather[0].main;
@@ -105,7 +105,7 @@ weatherForecast.onload = function () {
105105
day3 = weekday[dayWeek + 2];
106106
}
107107
console.log(`day3 is ${day3}`);
108-
document.getElementById('r3c1').innerHTML = day3;
108+
document.getElementById('r3c1').innerText = day3;
109109
document.getElementById('r3c3').innerHTML = Math.round(fObj.list[16].main.temp) + "°";
110110
document.getElementById('r3c2').src = "https://openweathermap.org/img/w/" + fObj.list[16].weather[0].icon + ".png";
111111
document.getElementById('r3c2').alt = fObj.list[16].weather[0].description;

0 commit comments

Comments
 (0)