Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

complete

  • Loading branch information...
commit 37cef7358cf928f5d6d1ede07518696b70464987 1 parent d1d61b1
Marcello Romanelli authored
4 public/applications/weather/css/small.css
@@ -40,6 +40,10 @@ h2 {
40 40 height: 450px;
41 41 padding: 30px;
42 42 margin: 80px auto 10px auto;
  43 + margin-top: 80px;
  44 + margin-right: auto;
  45 + margin-left: auto;
  46 + margin-bottom: 10px;
43 47 background-color: rgba(0, 0, 0, 0.6);
44 48 }
45 49
45 public/applications/weather/js/ws_small.js
@@ -45,7 +45,6 @@ $(function() {
45 45
46 46 function updateFirst(response,cityname){
47 47 var city = $("#first");
48   - var original = city.css("margin");
49 48 city.animate({"margin-left": "-530px"},'slow',function(){
50 49
51 50
@@ -59,25 +58,41 @@ function updateFirst(response,cityname){
59 58 $("#first_maxtemp").html(response.forecast[0].high_temperature + "º");
60 59 $("#first_mintemp").html(response.forecast[0].low_temperature + "º");
61 60 });
62   -
63   - city.animate({"margin": original},'fast');
  61 +
  62 + city.animate({"margin-left": "auto"},'fast');
64 63 city.effect("bounce", {direction:'left', times:3 }, 300);
65 64 }
66 65
67 66 function updateSecond(response,cityname){
68   - $("#second_img").attr("src","css/small_icons/"+response.condition.code +".png")
69   - freeCity($("#second_location").html());
70   - $("#second_location").html(cityname);
71   - $("#second_current_temp").html(response.condition.temperature + "º");
72   - $("#second_maxtemp").html(response.forecast[0].high_temperature + "º");
73   - $("#second_mintemp").html(response.forecast[0].low_temperature + "º");
  67 + var city = $($(".other").get(0));
  68 + var original = city.css("margin-top");
  69 + city.animate({"margin-left": "-530px"},'slow',function(){
  70 +
  71 +
  72 + $("#second_img").attr("src","css/small_icons/"+response.condition.code +".png")
  73 + freeCity($("#second_location").html());
  74 + $("#second_location").html(cityname);
  75 + $("#second_current_temp").html(response.condition.temperature + "º");
  76 + $("#second_maxtemp").html(response.forecast[0].high_temperature + "º");
  77 + $("#second_mintemp").html(response.forecast[0].low_temperature + "º");
  78 + });
  79 +
  80 + city.animate({"margin-left": "auto"},'fast');
  81 + city.effect("bounce", {direction:'left', times:3 }, 300);
74 82 }
75 83
  84 +
76 85 function updateThird(response,cityname){
77   - $("#third_img").attr("src","css/small_icons/"+response.condition.code +".png")
78   - freeCity($("#third_location").html());
79   - $("#third_location").html(cityname);
80   - $("#third_current_temp").html(response.condition.temperature + "º");
81   - $("#third_maxtemp").html(response.forecast[0].high_temperature + "º");
82   - $("#third_mintemp").html(response.forecast[0].low_temperature + "º");
  86 + var city = $($(".other").get(1));
  87 + var original = city.css("margin-top");
  88 + city.animate({"margin-left": "-530px"},'slow',function(){
  89 + $("#third_img").attr("src","css/small_icons/"+response.condition.code +".png")
  90 + freeCity($("#third_location").html());
  91 + $("#third_location").html(cityname);
  92 + $("#third_current_temp").html(response.condition.temperature + "º");
  93 + $("#third_maxtemp").html(response.forecast[0].high_temperature + "º");
  94 + $("#third_mintemp").html(response.forecast[0].low_temperature + "º");
  95 + });
  96 + city.animate({"margin-left": "auto"},'fast');
  97 + city.effect("bounce", {direction:'left', times:3 }, 300);
83 98 }

0 comments on commit 37cef73

Please sign in to comment.
Something went wrong with that request. Please try again.