Created
August 13, 2013 11:20
-
-
Save joelr/6220183 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<!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 £<span id='raised-vgm'><img src='http://i.imgur.com/0MhDodK.gif' /></span> on Virgin Money Giving</p> | |
<p>I have raised £<span id='raised-jg'><img src='http://i.imgur.com/0MhDodK.gif' /></span> on Just Giving</p> | |
<p>Total raised: £<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