-
Notifications
You must be signed in to change notification settings - Fork 78
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
Al Leonard: Weather Report #58
base: main
Are you sure you want to change the base?
Conversation
…r display. The change immediately resets, why?
… Expand this feature to include each city option.
const submitButton = document.querySelector("#submitButton"); | ||
submitButton.addEventListener("click", switchCity); |
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.
This isn't quite the behavior the requirements were asking for. For this section we were looking for two different pieces of functionality:
- An input listener on the text box that updates as the user enters text (https://www.w3schools.com/jsref/event_oninput.asp)
- a reset button that set the name back to a starting default
const addTemp = (event) => { // Add temp UP Behavior | ||
state.givenTemp += 1; | ||
const tempUp = document.querySelector("#givenTemp"); | ||
tempUp.textContent = state.givenTemp; | ||
numsChangeColor(); | ||
} | ||
const subTemp = (event) => { // Add temp DOWN Behavior | ||
state.givenTemp -= 1; | ||
const tempDown = document.querySelector("#givenTemp"); | ||
tempDown.textContent = state.givenTemp; | ||
numsChangeColor(); | ||
}; |
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.
Great helper functions!
// document.getElementById('givenTemp') || document.querySelector("#givenTemp"); | ||
|
||
////////////////////////////// WAVE 2 ////////////////////////////////// | ||
/////////////// METHODS (UP/DOWN TEMPERATURE) BEHAVIORS //////////////// |
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.
Wave 2 is missing the landscape change functionality.
let cityTempText = ""; | ||
let cityPicSrc = ""; | ||
|
||
switch (city){ |
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.
Excellent use of a switch statement! (And nice extension!)
Great work on this project! There are a few pieces of functionality that are missing from Waves 2 & 5. Overall this project is green, it looks like you hit all of the learning goals, but I would recommend going over the missing pieces of functionality and at a minimum think through or pseudocode adding those in. |
This is a static Website that uses HTML, CSS, and JavaScript.