-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript3.js
27 lines (21 loc) · 803 Bytes
/
script3.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const btnPopup=document.querySelector('.btnlogin-popoup');
const cover_box=document.querySelector('.cover_box');
const loginLink=document.querySelector('login-link');
const registerLink=document.querySelector('register-link');
const iconClose=document.querySelector('.icon-close');
function activateCoverBox(){
cover_box.classList.add('active');
}
function deactivateCoverBox(){
cover_box.classList.remove('acitve');
}
function activatePopup(){
cover_box.classList.add('active-popup');
}
function deactivateCoverPopup(){
cover_box.classList.remove('actived');
}
registerLink.addEventListener('click',activateCoverBox);
loginLink.addEventListener('click',deactivateCoverBox)
btnPopup.addEventListener('click',activatePopup);
iconClose.addEventListener('click',deactivateCoverPopup);