Skip to content

Instantly share code, notes, and snippets.

@iesta
Created February 25, 2015 14:35
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 iesta/600edc6e8956617563c6 to your computer and use it in GitHub Desktop.
Save iesta/600edc6e8956617563c6 to your computer and use it in GitHub Desktop.
Winnerboard Destock golf in french
<div id="luckyleaderboard"></div>
<style>ul.luckywinners {
list-style-type: none;
padding-left:0px;
}
ul.luckywinners li {
border: #dddddd 1px solid;
padding: 10px;
margin-bottom: 4px;
padding-left:0px;
text-align:center;
}
.luckyname {
font-weight: bold
}
.luckyvalue {
font-weight: bold
}
</style>
<script>
$.getJSON("https://www.luckycycle.com/operations/f479b4920c20add9f774ccee81553cf6/board.json", function (data) {
var items = [];
$.each(data, function (key, val) {
console.log("pop");
if (val.firstname) {
items.push('<li><span class="luckyname">' + val.firstname + " " + val.lastname.charAt(0) + '</span> a gagn&eacute; <span class="luckyvalue"> ' + val.value + "&euro;" + '</span></li>');
}
});
$("<ul/>", { "class": "luckywinners", html: items.join("") }).appendTo("#luckyleaderboard");
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment