comparison www/m/js/countin.js @ 7:40253bcfce03

push countin.js
author tzara <rc-web@kiben.net>
date Wed, 04 Jul 2012 22:08:35 +0000
parents
children
comparison
equal deleted inserted replaced
6:33e6dc370ef7 7:40253bcfce03
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 /////////////////////////////////////////////////