-
Notifications
You must be signed in to change notification settings - Fork 3
/
script.js
32 lines (28 loc) · 1019 Bytes
/
script.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
28
29
30
31
32
function changeToRegister() {
const changeToRegisterBtn = document.querySelector('#changeToRegister');
const changeToLogin = document.querySelector('#changeToLogin');
const loginForm = document.querySelector('#login');
const registerForm = document.querySelector('#register');
changeToRegisterBtn.addEventListener('click', () => {
loginForm.classList.remove('active')
registerForm.classList.add('active')
})
}
changeToRegister();
function changeToLogin() {
const changeToLoginBtn = document.querySelector('#chnageToLogin');
const loginForm = document.querySelector('#login');
const registerForm = document.querySelector('#register');
changeToLoginBtn.addEventListener('click', () => {
loginForm.classList.add('active')
registerForm.classList.remove('active')
})
}
changeToLogin();
function activeInput(event) {
if (screen.width > 600) {
let input = event;
input.style.border = '1px solid #4054D2';
}
}
activeInput()