Created
February 25, 2015 14:35
-
-
Save iesta/600edc6e8956617563c6 to your computer and use it in GitHub Desktop.
Winnerboard Destock golf in french
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
<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é <span class="luckyvalue"> ' + val.value + "€" + '</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