Created
March 13, 2015 01:37
-
-
Save JoeGermuska/88eef44105c6f131139d to your computer and use it in GitHub Desktop.
format backers as table
This file contains 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
function make_row(ary) { | |
var tr = $("<tr>") | |
for (var i = 0; i < ary.length; i++) { | |
$(tr).append("<td>" + ary[i] + "</td>") | |
} | |
return tr; | |
} | |
cols = ['idx','backer_count','mystery','base_pledge','total_pledged'] | |
var table = $('<table>'); | |
$(table).append(make_row(cols)); | |
$(table).insertAfter($("#public-stats")); | |
for (var i = 0; i < reward_distribution_data.length; i++) { | |
$(table).append(make_row(reward_distribution_data[i])) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment