Skip to content

Instantly share code, notes, and snippets.

@kkirsanov
Created July 27, 2016 12:24
Show Gist options
  • Select an option

  • Save kkirsanov/a35b24c905eb3835443b520c2f792614 to your computer and use it in GitHub Desktop.

Select an option

Save kkirsanov/a35b24c905eb3835443b520c2f792614 to your computer and use it in GitHub Desktop.
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
</head>
<body>
<script type="text/javascript">
function renew(){
$.ajax({
url: "http://31.31.203.22/votedata/1",
jsonp: "callback",
dataType: "jsonp",
success: function( response ) {
res =response['results_text']
$('#votedata').html('')
for (v of res) {
$('#votedata').html($('#votedata').html() + v[0] + ' присуждает ' + v[1] +' '+ v[2] + ' баллов<br>')
}
}
})
setTimeout(renew, 3000)
}
$( document ).ready(function() {
setTimeout(renew, 10)
});
</script>
<div id=votedata></div>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment