-
Notifications
You must be signed in to change notification settings - Fork 17
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
SOS #15
base: master
Are you sure you want to change the base?
SOS #15
Conversation
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.
Next time you can google for a CDN for the flag library instead of downloading and using node to install. That will eliminate having 500+ files you have to add to the repo: https://cdnjs.com/libraries/flag-icon-css
console.log("Error: Please input a valid city name."); | ||
}; | ||
|
||
function clearContents() { |
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.
You can clear contents just like you set them but instead of giving it text to set, you can set it with an empty string. $(something).text('')
var temp = (data.main.temp); | ||
var fahren = (9/5) * (temp - 273) + 32; | ||
var humid = (data.main.humidity); | ||
$('.temperature').text(Math.round(fahren) + " degrees Fahrenheit"); |
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.
Instead of doing all the math, you could have also used the API which requires another parameter to be sent as data in your ajax call 'units=imperial'. Since you are serializing your form to get the data automatically, you could have added another hidden input for this <input type="hidden" name="units" value="imperial">
You commit messages make me think you struggled but looking at your code, I'm not sure where you had issues? If you have a specific area that you don't understand, please let us know! But otherwise this hw looks great! |
incomplete and not working.