Skip to content

Commit

Permalink
Why add an extra localStorage?
Browse files Browse the repository at this point in the history
  • Loading branch information
archisman-panigrahi committed Jan 20, 2014
1 parent d62b398 commit 524dd12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function generateStats(data, callback) {
weather.country = $(data).filterNode('yweather:location').attr("country")

//Link
localStorage.typhoon_link = $(data).filterNode('item').children().filterNode("link").text()
weather.link = $(data).filterNode('item').children().filterNode("link").text()

//Temperature
weather.temperature = $(data).filterNode('item').children().filterNode("yweather:condition").attr("temp")
Expand Down Expand Up @@ -115,7 +115,7 @@ function render(location) {

getWeatherData(location, function(rawdata) {
generateStats(rawdata, function(weather) {
$('#city').html('<a href="' + localStorage.typhoon_link + '">' + localStorage.typhoon_location + '</a>')
$('#city').html('<a href="' + weather.link + '">' + localStorage.typhoon_location + '</a>')
$("#code").text(weather_code(weather.code)).attr("class", "w" + weather.code)

//Sets initial temp as Celsius
Expand Down

0 comments on commit 524dd12

Please sign in to comment.