Skip to content
This repository was archived by the owner on Jan 23, 2019. It is now read-only.
jamesfleeting edited this page Sep 14, 2010 · 17 revisions

Welcome to the jquery.simpleWeather wiki!

Usage

$.simpleWeather({
				zipcode: '76309',
				unit: 'f',
				success: function(weather) {
					$("#weather").append("<h2>"+weather.city+", "+weather.region+" "+weather.country+"</h2>");
					$("#weather").append("<p><strong>Today's High</strong>: "+weather.high+"&deg; "+weather.units.temp+" - <strong>Today's Low</strong>: "+weather.low+"&deg; "+weather.units.temp+"</p>");
					$("#weather").append("<p><strong>Current Temp</strong>: "+weather.temp+"&deg; "+weather.units.temp+"</p>");
					$("#weather").append("<p><strong>Wind</strong>: "+weather.wind.direction+" "+weather.wind.speed+" "+weather.units.speed+"</p>");
					$("#weather").append("<p><strong>Currently</strong>: "+weather.currently+" - <strong>Forecast</strong>: "+weather.forecast+"</p>");
					$("#weather").append('<p><img src="'+weather.image+'"></p>');
					$("#weather").append("<p><strong>Sunrise</strong>: "+weather.sunrise+" - <strong>Sunset</strong>: "+weather.sunset+"</p>");
					$("#weather").append("<p><strong>Last updated</strong>: "+weather.updated+"</p>");
					$("#weather").append('<p><a href="'+weather.link+'">View forecast at Yahoo! Weather</a></p>');
				},
				error: function(error) {
					alert(error);
				}
			});

Clone this wiki locally