We have the next use-case:
We are integrating Zendesk Web Widget into our system. Because Zendesk gives very limited ability to customize the button we decided to create our own button, which will control the visibility of the widget.
As described in a couple of articles - after the widget is initialized we are calling method hide() to hide the button.
We render our own button, which on click is calling "activate()" method of zE API.
The problem is that on the second click of my button I want to hide the widget.
The best solution for this problem will be toggle() API method, which will check if widget now is shown - it will hide it, if the widget is hidden - it will activate it.
Or at least to have some API from the Widget, which will return it's current state (shown/hidden).
Currently, to implement this behaviour I need to check "top" property of iFrame, and if it is -9999px - it indicates that the widget is hidden.
Vous devez vous connecter pour laisser un commentaire.