Skip to content

Instantly share code, notes, and snippets.

@tomcollins
Last active November 23, 2016 15:46
Show Gist options
  • Save tomcollins/a7dd48e3e2da58c7e4d4bec362b20608 to your computer and use it in GitHub Desktop.
Save tomcollins/a7dd48e3e2da58c7e4d4bec362b20608 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
width: 960px;
height: 500px;
position: relative;
}
</style>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script>
var images = [
'http://i.dailymail.co.uk/i/pix/2015/12/24/23/2F9AE0FC00000578-3373618-image-a-55_1451000145079.jpg'
];
function render() {
$.ajax({
url: 'http://aprice.org:8585/',
dataType: 'json',
success: function(data) {
var url = images[0];
var h = '<img src="' + url + '"/><h1>' + data.text +'</h1>';
$('body').append(h);
}
});
}
window.onload = render;
</script>
<body>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment