0
1

const modals = () => {
function bindModals(trigger, modal, close) {
trigger.addEventListener('click', (e) => {
if(e.target) {
e.prevent.default();
}

modal.style.display = 'block';
document.body.style.overflow = 'hidden';
})
close.addEventListener('click', () => {
    modal.style.display = 'none';
    document.body.style.overflow = '';
})
}

const callEngineerBtn = document.querySelector('.popup_engineer_btn'),
modalEngineer = document.querySelector('.popup__engineer'),
modalEngineerClose = document.querySelector('.popup_engineer .popup_close');
bindModals(callEngineerBtn, modalEngineer, modalEngineerClose);
}

export default modals


Медер Абдуллаев
1 year ago






Еще нет ответов