I
I
IliaMal2020-11-23 12:47:46
1C-Bitrix
IliaMal, 2020-11-23 12:47:46

On a landing page assembled on Sites24, it is necessary to replace the button with a modal window call, how to do this?

How to replace a button with a modal window?
Now, through the constructor, you can only change the link, but I need to make something like

<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
  Запустить модальное окно
</button>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita, 2020-11-24
@iFunction

As an option, in the link options there is an option to open in a pop-up window:
5fbcd7f18ef48162508105.jpeg
Another option is to bind the script that opens the popup to the link address.
Reference: #custom-popup-some-name

document.querySelectorAll('a[href^="#custom-popup"]').forEach(function(link) {
   // init popup link
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question