annotate www/m/js/countin.js @ 56:d8255f804d3d
added todo for zocky to have a look at
author |
tzara <rc-web@kiben.net> |
date |
Wed, 19 Dec 2012 17:40:38 +0000 |
parents |
40253bcfce03 |
children |
|
rev |
line source |
rc-web@7
|
1 /////////////////////////////////////////////////
|
rc-web@7
|
2 // countdown to change
|
rc-web@7
|
3 var socket = io.connect();
|
rc-web@7
|
4
|
rc-web@7
|
5 socket.on("countinFromServer", countinClient);
|
rc-web@7
|
6 function countinClient(groupID, currentseconds,mm,text,colour,background){
|
rc-web@7
|
7 var groupPage=document.getElementById('group').value
|
rc-web@7
|
8 if (groupID == groupPage) {
|
rc-web@7
|
9 console.log(currentseconds);
|
rc-web@7
|
10 document.getElementById("countinnumber").style.visibility="visible";
|
rc-web@7
|
11 document.getElementById("countinnumber").style.visibility="visible";
|
rc-web@7
|
12 //$("#countin").text(text);
|
rc-web@7
|
13 $("#countinnumber").text(currentseconds);
|
rc-web@7
|
14 $("#countinnumber").css('background-color', background);
|
rc-web@7
|
15
|
rc-web@7
|
16 document.getElementById("countinnumber").style.color=colour;
|
rc-web@7
|
17
|
rc-web@7
|
18 if ( currentseconds == 0) {
|
rc-web@7
|
19 document.getElementById("countinnumber").style.visibility='hidden';
|
rc-web@7
|
20 // document.getElementById("countin").style.visibility='hidden';
|
rc-web@7
|
21 }
|
rc-web@7
|
22 }}
|
rc-web@7
|
23
|
rc-web@7
|
24 ///////////////////////////////////////////////// |