An open API service indexing awesome lists of open source software.

https://github.com/thinkphp/request.forecastweather

Request.ForecastWeather is a simple class MooTools that extends Request.JSONP and display the local forecast weather on your website, blog or other web document.
https://github.com/thinkphp/request.forecastweather

Last synced: 6 months ago
JSON representation

Request.ForecastWeather is a simple class MooTools that extends Request.JSONP and display the local forecast weather on your website, blog or other web document.

Awesome Lists containing this project

README

          

Request.ForecastWeather
=======================
This is a simple plugin that shows you the local weather with JSONP&YQL-driven badge.

![Screenshot](http://farm5.static.flickr.com/4026/4659201615_5229b62e6d.jpg)

How to use
----------

First you must to include the JS files in the head of your HTML document.

#HTML


In your JavaScript source:

#JS
window.addEvent('domready',function(){
new Request.ForecastWeather('bucharest','c',{
onSuccess: function(o){
var title = '

'+o.query.results.weather.rss.channel.item.title+'

',
description = o.query.results.weather.rss.channel.item.description;
$('weatherbadge').set('html',title+description);
}
}).send();

//You can load the weather in an Element
$('custom').loadWeather('london','f');
});
In your HTML source:

#HTML


Dependencies

MooTools Core 1.3
MooTools More: Request.JSONP