Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

SOS #15

wants to merge 3 commits into from

Conversation

LallieDragon
Copy link

incomplete and not working.

Copy link

@BritneyJo BritneyJo left a 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() {

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");

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">

@BritneyJo
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants