Открыть блок в попапе

Как добавить блоки в попап
Пример работы скрипта
  • High quality
    We are the leading firm by delivering quality and value to our clients.
  • Support
    Our managers are always ready to answer your questions. You can call us at the weekends and at night.
  • Experience
    Each member of our team has at least 5 years of legal experience. They use their knowledge to make our clients’ life better.
  • Individual Approach
    Our company works according to the principle of individual approach to every client. This method allows us to achieve success at all levels.
Zero Block
Click "Block Editor" to enter the edit mode. Use layers, shapes and customize adaptability. Everything is in your hands.
Tilda Publishing
create your own block from scratch
  • Hight Quality
    We are a leading firm in providing quality and value to our customers. Each member of our team has at least 5 years of legal experience. We like what we do.
  • Good Support
    Our managers are always ready to answer your questions. You can call us during the weekends and at night. You can also visit our office for a personal consultation.
  • Nice Prices And Gifts
    Our prices are fixed for some standard services and we offer discounts for regular clients. Also, we ask our new clients about their birthday and prepare cool presents.
  • Individual Approach
    Our company works according to the principle of individual approach to every client. This method allows us to achieve success in problems of all levels.
#rec409535626,.uc-docs
#rec409542612,.uc-scripts
Инструкция
  • 1
    Добавьте на страницу попап с контентом
    Скрипт работает с блоком BF503
  • 2
    Установите скрипт на страницу в HTML-блок
    Скрипт должен быть установлен ниже блока попапа, в самом конце страницы, или в подвале
  • 3
    Добавьте ID блоков в контент попапа
    Вы можете добавлять по несколько блоков в каждую карточку, перечисляя их через запятую. Посмотреть как.
  • 4
    Опубликуйте страницу
    Наслаждайтесь результатом!
Скрипт
<script>
    fillPopup('#rec1234567'); // Вы можете добавлять строки с нужными ID блоков попапов, или добавить общий класс вида .uc-class, если код будет использоваться на многих страницах. Внимание! Если на странице несколько попапов - каждому нужен свой класс, или добавление через ID

    function fillPopup(id) {
        const $popup = $(id);
        const ids = $popup.find('.t390__descr').text().split(',');
        $popup.find('.t390__descr').html('');

        $(document).ready(() => {
            setTimeout(addBlocks, 0);
        });

        function addBlocks() {
            const ready = ids.every((id) => {
                if ($(id).find('[data-slider-transition]').length && $(id).find('[data-slider-transition]:not([data-slider-initialized="true"])').length) {
                    return false;
                }

                return true;
            });

            if (!ready) {
                setTimeout(addBlocks, 300);
                return;
            }

            ids.forEach((id) => {
                if (!$(id).length) {
                    return;
                }

                $popup.find('.t390__descr').append($(id));
            });
        }
    } // Инструкция по работе со скриптом https://trilda.ru/kak-dobavit-lubie-bloki-v-popap-tilda
</script>
Вопросы и комментарии
Made on
Tilda