Mercurial > hg > nodescore
comparison www/martin/js/countin.js @ 74:b7f9ade92165
added template for guitar version
author | Rob Canning <rc@kiben.net> |
---|---|
date | Sun, 29 Jun 2014 16:53:50 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
73:0c3a2942ddee | 74:b7f9ade92165 |
---|---|
1 ///////////////////////////////////////////////// | |
2 // countdown to change | |
3 var socket = io.connect(); | |
4 | |
5 socket.on("countinFromServer", countinClient); | |
6 function countinClient(groupID, currentseconds,mm,text,colour,background){ | |
7 var groupPage=document.getElementById('group').value | |
8 if (groupID == groupPage) { | |
9 console.log(currentseconds); | |
10 document.getElementById("countinnumber").style.visibility="visible"; | |
11 document.getElementById("countinnumber").style.visibility="visible"; | |
12 //$("#countin").text(text); | |
13 $("#countinnumber").text(currentseconds); | |
14 $("#countinnumber").css('background-color', background); | |
15 | |
16 document.getElementById("countinnumber").style.color=colour; | |
17 | |
18 if ( currentseconds == 0) { | |
19 document.getElementById("countinnumber").style.visibility='hidden'; | |
20 // document.getElementById("countin").style.visibility='hidden'; | |
21 } | |
22 }} | |
23 | |
24 ///////////////////////////////////////////////// |