Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (var i=0;i<9;i++){
- $('table').append("<tr class='ligne'></tr>");
- }
- var ligne = 1;
- $('.ligne').each(function(){
- for (var i=0;i<4;i++){
- $(this).append("<td id='col" + i + ligne + "'></td>");
- }
- ligne++;
- });
- ligne = 1;
- $('tr').each(function(){
- if (ligne == 7){
- $(this).children().first().text("Bonus");
- $(this).children().first().css('color', 'red');
- } else if (ligne == 8) {
- $(this).children().first().text("Total");
- $(this).children().first().css('background-color', 'red');
- } else if (ligne == 9) {
- $(this).children().first().text("Meilleur Score");
- $(this).children().first().css('color', 'orange');
- } else {
- $(this).children().first().text(ligne);
- }
- ligne++;
- });
- $('#col21').text("Brelan");
- $('#col22').text("Carré")
- $('#col23').text("Full");
- $('#col24').text("Petite suite");
- $('#col25').text("Grande suite");
- $('#col26').text("Chance");
- $('#col27').text("Yahtzee");
- $('#col28').text("Total Score");
- $('#col28').css('background-color', 'red');
- $('#col29').text("Nouvelle Partie");
- $('#col29').css('background-color', 'green');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement