Created
May 14, 2014 04:36
-
-
Save evantahler/823996078bc80d1c7d60 to your computer and use it in GitHub Desktop.
This file contains 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
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | |
</head> | |
<body> | |
<div id="container"></div> | |
<script type="text/javascript"> | |
var doRequest = function(action){ | |
$.get('/api/' + action, function(data){ | |
$('#container').append(JSON.stringify(data)) | |
$('#container').append('<hr />'); | |
}); | |
}; | |
setInterval(doRequest, 1000, 'randomNumber'); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment