Created
October 30, 2012 20:15
-
-
Save fleeting/3982707 to your computer and use it in GitHub Desktop.
Sample usage for the simpleWeather plugin. http://simpleweather.monkeecreate.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.simpleWeather({ | |
zipcode: '', | |
woeid: '2357536', | |
location: '', | |
unit: 'f', | |
success: function(weather) { | |
html = '<h2>'+weather.city+', '+weather.region+'</h2>'; | |
html += '<img style="float:left;" width="125px" src="'+weather.image+'">'; | |
html += '<p>'+weather.temp+'° '+weather.units.temp+'<br /><span>'+weather.currently+'</span></p>'; | |
html += '<a href="'+weather.link+'">View Forecast »</a>'; | |
$("#weather").html(html); | |
}, | |
error: function(error) { | |
$("#weather").html('<p>'+error+'</p>'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment