-
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
weather-app update #14
base: master
Are you sure you want to change the base?
Conversation
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | ||
<link rel="stylesheet" href="css/style.css"> |
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.
Good catch!
var toF; | ||
var thisMap; | ||
|
||
$('.weather-app').css('background-color', 'rgba(255,255,255,.5)'); |
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.
I'd prefer you set this in the CSS and not use js to add custom styles.
//Initialized description | ||
$('.description').append("<strong>Condition Outside:</strong> "); | ||
|
||
$('.submission').click(function(event){ |
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.
Is this doing anything?
$('.flag-icon').empty(); | ||
$('.city-error').css('display', 'none'); | ||
|
||
var toF = parseInt(((((weatherData.main.temp)-273.15)*1.8)+32)); |
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">
.
var toF = parseInt(((((weatherData.main.temp)-273.15)*1.8)+32)); | ||
console.dir(toF); | ||
$('.results-city').append(weatherData.name + ", " + weatherData.sys.country); | ||
$('.temperature').append(toF + '°'); |
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'll want to look up the character code for the degree symbol. While it may work in some browsers, it will also break in a lot more.
No description provided.