(function() {
function onTidioChatApiReady() {
window.tidioChatApi.hide();
}
if (window.tidioChatApi) {
window.tidioChatApi.on("ready", onTidioChatApiReady);
}
document.querySelector(".chat-button").addEventListener("click", function() {
window.tidioChatApi.show();
window.tidioChatApi.open();
});
})();
Open chat!
(function() {
function onTidioChatApiReady() {
window.tidioChatApi.hide();
window.tidioChatApi.on("close", function() {
window.tidioChatApi.hide();
});
}
if (window.tidioChatApi) {
window.tidioChatApi.on("ready", onTidioChatApiReady);
} else {
document.addEventListener("tidioChat-ready", onTidioChatApiReady);
}
document.querySelector(".chat-button").addEventListener("click", function() {
window.tidioChatApi.show();
window.tidioChatApi.open();
});
})();
top of page
bottom of page