<!-- Скрипт для переключения между двумя и более изображениями Tilda с сайта bulgkate.ru -->
<script>
const step1 = document.querySelector('.uc-step1');
const step2 = document.querySelector('.uc-step2');
let isStep1Visible = true;
setInterval(() => {
if (isStep1Visible) {
step1.style.opacity = '0';
step1.style.zIndex = '100';
step2.style.opacity = '1';
step2.style.zIndex = '200';
} else {
step1.style.opacity = '1';
step1.style.zIndex = '200';
step2.style.opacity = '0';
step2.style.zIndex = '100';
}
isStep1Visible = !isStep1Visible;
}, 400);
</script>
<style>
.uc-step1,
.uc-step2 {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: auto;
pointer-events: none;
}
.uc-step1 {
opacity: 1;
z-index: 200;
}
.uc-step2 {
opacity: 0;
z-index: 100;
}
</style>