-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented 5-day forecast #7
base: master
Are you sure you want to change the base?
Conversation
@ThePredatorBG Since the JS is slowly starting to grow we need to create an easy to use and scale organization of the code. Create folders and move js
|
script.js
Outdated
{ | ||
document.querySelector("#day" + (i+1) + "Min").innerHTML = "Min: " + data.list[i].main.temp_min + "°C"; | ||
} | ||
for(i=0;i<5;i++) | ||
{ | ||
document.querySelector("#day" + (i+1) + "Max").innerHTML = "Max: " + data.list[i].main.temp_max + "°C"; | ||
} | ||
for(i=0;i<5;i++) | ||
{ | ||
document.querySelector("#img" + (i+1)).src = "http://openweathermap.org/img/wn/" + data.list[i].weather[0].icon+"@2x.png"; | ||
} | ||
console.log(data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ThePredatorBG no need to do 3 loops. same can be achieved with a single loop.
Also please remove all console.logs before committing
Includes little visual adjustments to existing HTML on the "About me" page.
Also includes the changes requested in #5's review.