Skip to content

Instantly share code, notes, and snippets.

@sixthgear
Forked from anonymous/gist:979787
Created May 18, 2011 23:22
Show Gist options
  • Save sixthgear/979811 to your computer and use it in GitHub Desktop.
Save sixthgear/979811 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