Mercurial > hg > nodescore
diff www/8/js/countin.js @ 63:9bf133b91890
big fix and move to order 8
author | tzara <rc-web@kiben.net> |
---|---|
date | Tue, 21 May 2013 00:35:33 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/8/js/countin.js Tue May 21 00:35:33 2013 +0000 @@ -0,0 +1,24 @@ +///////////////////////////////////////////////// +// countdown to change +var socket = io.connect(); + +socket.on("countinFromServer", countinClient); +function countinClient(groupID, currentseconds,mm,text,colour,background){ + var groupPage=document.getElementById('group').value + if (groupID == groupPage) { + console.log(currentseconds); + document.getElementById("countinnumber").style.visibility="visible"; + document.getElementById("countinnumber").style.visibility="visible"; + //$("#countin").text(text); + $("#countinnumber").text(currentseconds); + $("#countinnumber").css('background-color', background); + + document.getElementById("countinnumber").style.color=colour; + + if ( currentseconds == 0) { + document.getElementById("countinnumber").style.visibility='hidden'; +// document.getElementById("countin").style.visibility='hidden'; + } + }} + +///////////////////////////////////////////////// \ No newline at end of file