Mercurial > hg > nodescore
comparison www/emma/js/countin.js @ 66:d8f494bdbb18
added emma dir
author | tzara <rc-web@kiben.net> |
---|---|
date | Fri, 07 Jun 2013 16:18:43 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
65:ab53902406d4 | 66:d8f494bdbb18 |
---|---|
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 ///////////////////////////////////////////////// |