Skip to content

Instantly share code, notes, and snippets.

@sivabudh
Last active December 15, 2015 21:58
Show Gist options
  • Save sivabudh/5329215 to your computer and use it in GitHub Desktop.
Save sivabudh/5329215 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script>
$(document).ready(function(){
fetchWorldStates();
});
function fetchWorldStates(){
console.log("Fetching World States..");
$.get("http://pac-sinatra.herokuapp.com",{cmd:"states"},updateIceWorldStates, "json");
}
function updateIceWorldStates(data){
console.log(data);
console.log(data.hello);
}
</script>
</head>
<body>
<canvas width="400" height="400"></canvas>
<p id="test">
there is suppose to be a json here:
</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment