Iata cum a fost facuta:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$.ajax({
url: "http://api.wunderground.com/api/dc5dec6546fbfb13/conditions/lang:RO/q/Romania/Bucharest.json",
dataType: "jsonp",
success: function(parsed_json) {
var location = parsed_json['current_observation']['display_location']['city'];
var temp_f = parsed_json['current_observation']['temp_c'];
var img = parsed_json['current_observation']['icon'];
var time = parsed_json['current_observation']['local_time_rfc822'].split(" ")[4];
time=time.split(":");
$("body").append("<div class='weather-box'><div class='icon'><img src=http://icons.wxug.com/i/c/i/"+img+".gif></div><div class='location'>"+location+"</div><strong>" + temp_f+"°C </strong><strong>"+time[0]+":"+time[1]+"</strong> </div>");
}
});
});
</script>
Simplu nu?
Api@ http://api.wunderground.com este grozav si extem de simplu de folosit!
Ps. nu uitati sa inlocuiti numarul lung cu propia cheie api.