-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
29 lines (24 loc) · 826 Bytes
/
Copy pathapp.js
File metadata and controls
29 lines (24 loc) · 826 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
let Cursor = document.querySelector(".cursor");
let navLinks = document.querySelectorAll(".navbar-nav li");
window.addEventListener("mousemove", cursor);
function cursor(e){
Cursor.style.top = e.pageY + "px";
Cursor.style.left = e.pageX + "px";
}
navLinks.forEach(link => {
link.addEventListener("mouseover", () => {
Cursor.classList.add("link-grow");
link.classList.add("hovered-link");
});
link.addEventListener("mouseleave", () => {
Cursor.classList.remove("link-grow");
link.classList.remove("hovered-link");
});
});
const logo = document.querySelectorAll("#logo path");
for(let i=0; i<logo.length; i++){
console.log(`Letter ${i} is ${logo[i].getTotalLength()}`);
}
setTimeout(function(){
$('.loader').fadeToggle();
}, 4850);