-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscripty.js
47 lines (39 loc) · 1.16 KB
/
scripty.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
"use strict";
const darkButt = document.getElementById('darkButt');
const nam = document.getElementById('name');
let dark = true;
darkButt.onclick = () => {
if(dark){
darkButt.innerHTML = '☉'
document.body.classList.add('light');
dark = false;
}
else{
darkButt.innerHTML = '☾'
document.body.classList.remove('light');
dark = true;
}
}
email.onmouseover = () => {
let hoverCont = document.createElement('div');
hoverCont.classList.add('hoverCont');
hoverCont.id = 'hoverCont';
hoverCont.innerText = '[email protected]';
email.appendChild(hoverCont);
hoverCont.style.top = email.style.top;
hoverCont.style.left = Number(email.style.left) - hoverCont.offsetWidth/3 + 'px';
}
email.onmouseout = () => {
if(document.getElementById('hoverCont')){
document.getElementById('hoverCont').remove();
}
}
nam.onmouseover = () => {
nam.innerText = 'Cory C(a)masta';
}
nam.onmouseout = () => {
nam.innerText = 'Cory Camasta'
}
nam.onclick = () => {
window.scrollTo(0,document.getElementById('bigpic').style.top);
}