> For the complete documentation index, see [llms.txt](https://docs.omnichat.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.omnichat.ai/en/integration/button-event.md).

# Button Event

You can add the following code to the button trigger code on your website to simultaneously open the chat plugin.

```
let omnichatButton = document.getElementById('easychat-floating-button');
let event = new Event('click');
omnichatButton.dispatchEvent(event);
```
