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.
- Host: GitHub
- URL: https://github.com/thinkphp/request.forecastweather
- Owner: thinkphp
- Created: 2010-06-02T08:29:13.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2010-11-10T08:46:40.000Z (about 15 years ago)
- Last Synced: 2024-04-14T14:54:28.677Z (almost 2 years ago)
- Language: JavaScript
- Homepage: http://thinkphp.github.com/Request.ForecastWeather/
- Size: 148 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Request.ForecastWeather
=======================
This is a simple plugin that shows you the local weather with JSONP&YQL-driven badge.

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