<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));
});
}
}
</script>