Hi guys, how can I programmatically open/close the widget?
I would like to press a specific button on my app to open the widget, hiding the default widget’s “big button”.
Is it possible?
Thanks in advance!
Alex
Hi guys, how can I programmatically open/close the widget?
I would like to press a specific button on my app to open the widget, hiding the default widget’s “big button”.
Is it possible?
Thanks in advance!
Alex
Hi Alex.
You should mix open/show and close/hide methods to achieve your task (This will change
in the near future).
Use the guide in this example:
https://tiledesk-html-site.tiledesk.repl.co/
In the example the widget starts hidden.
window.tiledeskSettings= { projectid: "61f4fc7b9dabc200196914d8", startHidden: true };
The use a couple of buttons (and relative javascript handlers) to show/hide the widget.
function openWidget() { window.Tiledesk('show'); window.Tiledesk('open'); } function closeWidget() { window.Tiledesk('close'); window.Tiledesk('hide'); }
Hope this helps.
Andrea