Conversation
index.html
Outdated
| <meta charset="utf-8"> | ||
| <title>Mini Weather App</title> | ||
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css" integrity="sha256-HxaKz5E/eBbvhGMNwhWRPrAR9i/lG1JeT4mD6hCQ7s4=" crossorigin="anonymous" /> | ||
| <link rel="stylesheet" href="css/style.css"> |
There was a problem hiding this comment.
Make sure your custom CSS is the last file loaded (bootstrap , normalize, googlefont) should all be first.
| $(document).ready(function(){ | ||
| console.log('ready'); | ||
|
|
||
| //I DONT KNOW WHAT TO DO TO MAKE MY WEBSITE DELETE OLD STUFF ON ENTRY!!! |
There was a problem hiding this comment.
You can try to just clear out the text in those inputs by setting it to an empty string $(input).text('').
There was a problem hiding this comment.
that worked; thank you. i tried my .remove() functions again, and apparently they work now 😄
edit: i lied, something is wrong with them.. i'll try both in the future.
| $.ajax({ | ||
| method: 'GET', | ||
| url: 'http://api.openweathermap.org/data/2.5/weather', | ||
| data: $('form').serialize() + '&units=imperial&appid=a77765c844f61df44fe43412c991b9cf', |
There was a problem hiding this comment.
Since you are serializing the form, you can also add two hidden inputs for appid and units to the form to be included instead of writing them out by hand here.
| var temp = parseFloat(data.main.temp); | ||
| console.log(temp); | ||
| $('.temperature-container').css('visibility', 'visible'); | ||
| $('.temperature').append(temp + String.fromCharCode(176) + "F"); |
There was a problem hiding this comment.
Nice find!! This would be a good spot to have a comment to let others know what the code is for.
There was a problem hiding this comment.
for the styling, temperature format when append'ed to html, or both?
|
|
||
| // error 403 forbidden for img :'( | ||
| function displayCityAndIcon(data){ | ||
| var cityName = String(data.name); |
There was a problem hiding this comment.
This works, but it's unnecessary since the data.name returned is already a string.
…y jo; safety commit, progress to be made... over and out
…on changing based on actual weather description), needs work on rwd
Karla Moreno submitting weather-app assignment
...most definitely should've given myself more time to do this assignment