Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@joelr
Created August 13, 2013 11:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joelr/6220183 to your computer and use it in GitHub Desktop.
Save joelr/6220183 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type='text/javascript'>
$(function() {
$.getJSON('http://api.jo.je/justgiving/jsonp.php?d=Team-Prologis&callback=?', {}, function (data) {
$("#raised-jg").html(data.donations_total);
jg_total = data.donations_total;
$.getJSON('http://api.jo.je/virginmoneygiving/jsonp.php?d=359611&callback=?', {}, function (data) {
$('#raised-vgm').html(data.money_total);
$('#total').html(parseFloat(data.money_total) + parseFloat(jg_total));
})
})
});
</script>
</head>
<body>
<p>I have raised &pound;<span id='raised-vgm'><img src='http://i.imgur.com/0MhDodK.gif' /></span> on Virgin Money Giving</p>
<p>I have raised &pound;<span id='raised-jg'><img src='http://i.imgur.com/0MhDodK.gif' /></span> on Just Giving</p>
<p>Total raised: &pound;<span id='total'><img src='http://i.imgur.com/0MhDodK.gif' /></span></p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment