diff --git a/code/html5/score.html b/code/html5/score.html new file mode 100644 index 0000000..53d1783 --- /dev/null +++ b/code/html5/score.html @@ -0,0 +1,31 @@ + + + + PtiClic pre-alpha 0.2 + + + + + + + + +
+

Score total :

+
+ +
+ + diff --git a/code/html5/score.json b/code/html5/score.json new file mode 100644 index 0000000..5f461a5 --- /dev/null +++ b/code/html5/score.json @@ -0,0 +1 @@ +[{"id":84632,"name":"camion","score":3},{"id":61939,"name":"transbahutage","score":10},{"id":104263,"name":"trimbaler","score":4},{"id":44654,"name":"transporter","score":-2},{"id":38285,"name":"d\u00e9m\u00e9nageur","score":5},{"id":43404,"name":"porter","score":5},{"id":63192,"name":"transports","score":-1},{"id":130473,"name":"enthousiasmer","score":0},{"id":90461,"name":"se trimbaler","score":6},{"id":134609,"name":"baguenauder","score":9}] \ No newline at end of file diff --git a/code/html5/scores.js b/code/html5/scores.js new file mode 100644 index 0000000..9adbc3b --- /dev/null +++ b/code/html5/scores.js @@ -0,0 +1,13 @@ +$(function () { + var url = "score.json"; + $.getJSON(url, function(data) { + console.log(data); + $.each(data, function(i,e) { + $("#templates .scoreLine") + .clone() + .find(".word").text(e.name).end() + .find(".score").text(e.score).end() + .appendTo(".scores") + }); + }) +}); \ No newline at end of file