> For the complete documentation index, see [llms.txt](https://help.wotnot.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.wotnot.io/deploy/web-chat-widget/js-functions-to-trigger-chat-widget.md).

# JS functions to trigger chat widget

Javascript functions to display and hide the chat widget on your webpage.

Execute the following Javascript functions to trigger the chat widget on your web page.

### Opening the chat widget

```
wn.openWidget(); 

//Opens the chat window but minimizes it when clicked on the cross
wn.openWidget(true)
```

{% embed url="<https://www.loom.com/share/3aac595347a34fcdb35fc62216e7400a?sid=7caa0e58-d69d-4a6e-b9dd-fa2b7136cdd1>" %}

### Hiding the chat widget

<pre><code><strong>wn.hideWidget();
</strong></code></pre>

{% embed url="<https://www.loom.com/share/dc3cdcd8ff904cccafcc8bfe1927b565?sid=12ca6a07-eada-45b0-a139-e633d483110d>" %}

### Showing the chat widget

```
wn.showWidget();

//Shows the chat bubble but minimizes it when clicked on the cross.
wn.showWidget(true)  
```

{% embed url="<https://www.loom.com/share/3d2af81bddb64ef78d94558d48762a47?sid=332bc593-9c1e-42a7-a2c2-641dfad97784>" %}
