const brifParent = document.querySelector('.brife__wrapper')
let brifeLeft = document.querySelector('.brife__left')
brifParent.addEventListener('input', e => {
const target = e.target;
if (target.classList.contains('input-info')) {
let rightInput = target.getAttribute('data-name');
if (rightInput === brifeLeft.querySelector(['[data-name=' + rightInput + '']).getAttribute('data-name')) {
brifeLeft.querySelector(['[data-name=' + rightInput + '']).textContent = target.value
}
}
})
let preloadImg = document.querySelectorAll('.pr-bub');
let arrayBub = Array.from(preloadImg)
let reverseArray = arrayBub.reverse();
function setClassBub() {
reverseArray.forEach((bub, index) => {
setTimeout(() => {
bub.classList.add('animationPreBub')
if (index === (reverseArray.length - 1)) {
setTimeout(() => {
reverseArray.forEach((item) => {
item.classList.remove('animationPreBub')
})
}, 200)
setClassBub();
}
}, 300 * (index + 1))
})
}
setClassBub();
let nav = d.querySelector('.nav')
nav.addEventListener('click', activeTabs)
function activeTabs(e) {
let items = d.querySelectorAll('.nav-item')
const target = e.target
if (target.classList.contains('nav-item') {
target.classList.add('active');
}
items.forEach(item => {
item.classList.remove('active')
})
}