Created
October 15, 2012 15:56
-
-
Save fleeting/3893256 to your computer and use it in GitHub Desktop.
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
$(document).ready(function() { | |
weather(); | |
setInterval(weather, 15000); | |
}); | |
function weather() { | |
$.simpleWeather({ | |
zipcode: '19104', | |
unit: 'f', | |
success: function(weather) { | |
html = '<img style="float:left;" width="210px" src="'+weather.image+'">'; | |
html += '<p>'+weather.temp+'° '+weather.units.temp+'<br /><span>'+weather.currently+'</span></p>'; | |
$("#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