We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eee2c7e commit 87b5afcCopy full SHA for 87b5afc
MagneticButton/app.js
@@ -2,6 +2,7 @@ console.log("hello");
2
let btn = document.querySelectorAll(".btn");
3
btn.forEach((el) => {
4
el.addEventListener("mousemove", (e) => {
5
+ e.preventDefault();
6
let rect = el.getBoundingClientRect();
7
8
let x = e.clientX - (rect.left + rect.width / 2);
0 commit comments