rc-web@63: ///////////////////////////////////////////////// rc-web@63: // countdown to change rc-web@63: var socket = io.connect(); rc-web@63: rc-web@63: socket.on("countinFromServer", countinClient); rc-web@63: function countinClient(groupID, currentseconds,mm,text,colour,background){ rc-web@63: var groupPage=document.getElementById('group').value rc-web@63: if (groupID == groupPage) { rc-web@63: console.log(currentseconds); rc-web@63: document.getElementById("countinnumber").style.visibility="visible"; rc-web@63: document.getElementById("countinnumber").style.visibility="visible"; rc-web@63: //$("#countin").text(text); rc-web@63: $("#countinnumber").text(currentseconds); rc-web@63: $("#countinnumber").css('background-color', background); rc-web@63: rc-web@63: document.getElementById("countinnumber").style.color=colour; rc-web@63: rc-web@63: if ( currentseconds == 0) { rc-web@63: document.getElementById("countinnumber").style.visibility='hidden'; rc-web@63: // document.getElementById("countin").style.visibility='hidden'; rc-web@63: } rc-web@63: }} rc-web@63: rc-web@63: /////////////////////////////////////////////////