Hello,
Firstly, I apologise if this has already been covered off as I suspect it probably has.
Alongside the Zendesk button, we have custom chat button on our hc that fires the chat button on click
<button id="chat_submit" class="button" onclick=" $zopim.livechat.button.show();
$zopim.livechat.window.show();
$zopim.livechat.bubble.show();" style="display: none;">Chat</button>
This works fine, accept that when no agents are online it still fires the chat button with a un helpful message (it won’t trigger the offline Get Help widget that the ZD button does). I have added an image of what happens (apologies for quality, it was supplied to me), may be worth noting it looks like this was taken while the user was on a mobile.
Ideally, what I'd like to be able to do is hide this button when no agents are online, I see that there is a
$zopim.livechat.button.hide function in the Javascript API, but I assume this only works for the Zendesk button?
Is there a way I can for example add display:none; to #chat_submit when no agents are online? For an example please see
ask.library.unisa.edu.au
Thanks for your help
Sam
