-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcalculator.js
More file actions
30 lines (28 loc) · 1006 Bytes
/
Copy pathcalculator.js
File metadata and controls
30 lines (28 loc) · 1006 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
30
function del(){
var value=document.getElementById('screen').value;
document.getElementById('screen').value=value.substr(0,value.length-1);
}
var two=document.getElementById('two');
two.addEventListener('click',function(){
var body=document.querySelector('body');
var toggle=document.getElementById('circle');
body.classList.add('active1');
body.classList.remove('active2');
toggle.style.left='36%';
})
var one=document.getElementById('one');
one.addEventListener('click',function(){
var body=document.querySelector('body');
var toggle=document.getElementById('circle');
body.classList.remove('active1');
body.classList.remove('active2');
toggle.style.left='0';
})
var three=document.getElementById('three');
three.addEventListener('click',function(){
var body=document.querySelector('body');
var toggle=document.getElementById('circle');
body.classList.add('active2');
body.classList.remove('active1');
toggle.style.left='65%';
})