I'm creating a button to open chat on one of my sites. I'm currently using Zopim.
To open the chat, the link is used:
<a href="javascript:void($zopim.livechat.window.show())">ABRIR CHAT</a>
To close the chat, the link is used:
<a href="javascript:void($zopim.livechat.window.hide())">FECHAR CHAT</a>
I need when to click on Abrir o Chat
, the link automatically changes to Fechar o Chat
and that when the person clicks Fechar o Chat
change to Abrir o Chat
.
That is, it keeps switching, when you click on one the link changes to the other.
So with the same button I can open and close the chat.