Skip to content

Commit

Permalink
Code refactors
Browse files Browse the repository at this point in the history
  • Loading branch information
skoshy committed Jan 8, 2017
1 parent 3ec7c28 commit dfd64ad
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -674,16 +674,14 @@ function getAndUpdateWeather(location, isUsingWeatherId) {
}

$.get("http://api.k0shy.com/weather/?"+param+"="+location, function( data ) {
$('.weather .loader').stop().fadeOut(100);

console.log("Weather received! Updating...");
updateWeather(data);
updateWeatherDisplay();
}).fail(function() {
}).fail(function(e) {
console.log(e);
$('.weather_location_container').stop().effect("highlight", {color: "ff9595"}, 2000);
}).always(function() {
$('.weather .loader').stop().fadeOut(100);

console.log(error);
$('.weather_location_container').effect("highlight", {color: "ff9595"}, 2000);
});
}

Expand Down

0 comments on commit dfd64ad

Please sign in to comment.