D
D
Dim2019-08-01 11:24:19
JavaScript
Dim, 2019-08-01 11:24:19

What code to put on the link so that when you click on it, the Bitrix24 widget opens?

I want to put a link in the text of the article, for example , "Write us an online chat"
So that a Bitrix 24 widget opens on click, or even an online chat opens immediately.
Is it possible to do this and what code should I put on the link?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Nikolaev, 2019-08-05
@Dee3

This issue is widely covered in the topic dedicated to advanced settings.
It is necessary to subscribe to the event and subscribe to the click event during initialization.

window.addEventListener('onBitrixLiveChat', function(event)
{
  var widget = event.detail.widget;

  // Подписываемся на onClick событие вашей кнопки.
  // Выполняем widget.open()
  
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question