-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathPayment JS.js
29 lines (23 loc) · 1.31 KB
/
Payment JS.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
document.querySelector('.card-number-input').oninput = () =>{
document.querySelector('.card-number-box').innerText = document.querySelector('.card-number-input').value;
}
document.querySelector('.card-holder-input').oninput = () =>{
document.querySelector('.card-holder-name').innerText = document.querySelector('.card-holder-input').value;
}
document.querySelector('.month-input').oninput = () =>{
document.querySelector('.exp-month').innerText = document.querySelector('.month-input').value;
}
document.querySelector('.year-input').oninput = () =>{
document.querySelector('.exp-year').innerText = document.querySelector('.year-input').value;
}
document.querySelector('.cvv-input').onmouseenter = () =>{
document.querySelector('.front').style.transform = 'perspective(1000px) rotateY(-180deg)';
document.querySelector('.back').style.transform = 'perspective(1000px) rotateY(0deg)';
}
document.querySelector('.cvv-input').onmouseleave = () =>{
document.querySelector('.front').style.transform = 'perspective(1000px) rotateY(0deg)';
document.querySelector('.back').style.transform = 'perspective(1000px) rotateY(180deg)';
}
document.querySelector('.cvv-input').oninput = () =>{
document.querySelector('.cvv-box').innerText = document.querySelector('.cvv-input').value;
}