Hi, I have code: <b id="chat_status"></b> <script> function updateStatus(s) { document.getElementById('chat_status').innerHTML = s; } $zopim.livechat .setOnStatus(updateStatus) </script> Code (markup): this function shows on my website ONLINE or OFFLINE text in the 'chat_status' tag when I am online or offline on my PC. Is possible to show different color of the text ONLINE and OFFLINE depending if I am online or offline? Thanks.
You can do it using document.getElementById('chat_status').style.color like this: document.getElementById('chat_status').style.color = #FF0000; Code (markup):
nothing shows... <b id="chat_status"></b> <script> function updateStatus(s) { document.getElementById('chat_status').innerHTML = s; document.getElementById('chat_status').style.color = #FF0000; } $zopim.livechat .setOnStatus(updateStatus) </script>