This repository has been archived by the owner on Jan 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 147
Home
jamesfleeting edited this page Sep 14, 2010
·
17 revisions
Welcome to the jquery.simpleWeather wiki!
A complete demo can be found at monkeeCreate
$.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+"° "+weather.units.temp+" - <strong>Today's Low</strong>: "+weather.low+"° "+weather.units.temp+"</p>"); $("#weather").append("<p><strong>Current Temp</strong>: "+weather.temp+"° "+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); } });