Skip to content

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Aditya0950 committed Apr 10, 2024
1 parent 53602c8 commit 2abfe39
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,11 @@ nav.addEventListener("mouseleave", function () {
a.style.top = "0%";
})
})

let crsr = document.querySelector("#Cursor");
let container = document.querySelector("#Container");

container.addEventListener("mousemove", function (dets) {
crsr.style.top = dets.y + "px";
crsr.style.left = dets.x + "px";
})

0 comments on commit 2abfe39

Please sign in to comment.