-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
29 lines (25 loc) · 925 Bytes
/
Copy pathscript.js
File metadata and controls
29 lines (25 loc) · 925 Bytes
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
28
29
const wrapper = document.querySelector('.wrapper');
const loginLink = document.querySelector('.login-link');
const registerLink = document.querySelector('.register-link');
const btnPopup = document.querySelector('.btnLogin');
const iconClose = document.querySelector('.icon-close');
registerLink.addEventListener('click',()=> {
wrapper.classList.add('active');
});
loginLink.addEventListener('click',()=> {
wrapper.classList.remove('active');
});
btnPopup.addEventListener('click',()=> {
wrapper.classList.add('active-popup');
});
iconClose.addEventListener('click',()=> {
wrapper.classList.remove('active-popup');
});
function auth(){
var email = document.getElementById("email-id").value;
var password = document.getElementById("password").value;
if(email == "admin@gmail.com" && password == "admin123"){
window.location.href = "index1.html";
alert("Login success");
}
}