como o usar simpleweatherjs?

HTML

CSS

JavaScript

10/11/2016

Alguém saberia me dizer como faço para poder utilizar o simpleweatherjs? Eu baixei todos os arquivos certinho no http://simpleweatherjs.com/

Coloquei o HTML e JS
<!-- Docs at http://http://simpleweatherjs.com -->
<div id="weather"></div>



// v3.1.0
//Docs at http://simpleweatherjs.com
$(document).ready(function() {
  $.simpleWeather({
    location: 'Austin, TX',
    woeid: '',
    unit: 'f',
    success: function(weather) {
      html = '<h2><i class="icon-'+weather.code+'"></i> '+weather.temp+'°'+weather.units.temp+'</h2>';
      html += '<ul><li>'+weather.city+', '+weather.region+'</li>';
      html += '<li class="currently">'+weather.currently+'</li>';
      html += '<li>'+weather.wind.direction+' '+weather.wind.speed+' '+weather.units.speed+'</li></ul>';
  
      $("#weather").html(html);
    },
    error: function(error) {
      $("#weather").html('<p>'+error+'</p>');
    }
  });
});
Ramon Barbosa

Ramon Barbosa

Curtidas 0
POSTAR