Skip to content

Instantly share code, notes, and snippets.

Created May 18, 2011 23:04
Show Gist options
  • Save anonymous/979787 to your computer and use it in GitHub Desktop.
Save anonymous/979787 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
function getData() {
$.getJSON("script.php", function(data) {
$.each(data, function(index) {
$("#high").html(data[index].high + "<br />" + Math.floor(Math.random()*111));
});
});
}
getData();
var auto_refresh = setInterval("getData()",5000);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment