forked from Prashantsetia/codeYgenWebsite
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
31 lines (26 loc) · 820 Bytes
/
index.js
File metadata and controls
31 lines (26 loc) · 820 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
31
console.log("Prashant");
// console.log(window.scrollTop());
document.addEventListener("scroll", function() {
var top = document.getElementById("mybt");
if (window.scrollY > 600) {
console.log("scroll");
top.classList.add("visible");
} else {
top.classList.remove("visible");
}
});
window.onload = function() {
const cam = document.getElementById('cam');
console.log(cam);
cam.addEventListener('mouseenter', () => {
console.log('Prashant');
var but = document.getElementById("but");
but.style.display = "unset";
});
cam.addEventListener('mouseleave', () => {
console.log('Prashant');
var but = document.getElementById("but");
but.style.display = "none";
});
}
// ----------------------------------------