Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
totaro committed Jan 3, 2024
1 parent 6dc1092 commit cc56abb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<li><a href="#spinnerloader" id="menu-link">Spinner Loader</a></li>
<li><a href="#textloader" id="menu-link">Text Loader</a></li>
<li><a href="#animatedbutton" id="menu-link">Animated Button</a></li>
<li><a href="#typewritereffect" id="menu-link">Typewriter</a></li>
<li><a href="#typewritereffect" id="menu-link">Typewriter Effect</a></li>
<li><a href="#mousefollow" id="menu-link">Mouse Follow</a></li>
</ul>
</div>
Expand Down Expand Up @@ -149,7 +149,7 @@ <h5><ul class="inner-links">
<div class="entry">
<div class="entry__meta">
<h6>Motion<span></span>#4</h6>
<h4>Typewriter</h4>
<h4>Typewriter Effect</h4>
<h5><ul class="inner-links">
<li><a href="#top">Top <i class="fa-solid fa-arrow-turn-up"></i></a></li>
</ul>
Expand All @@ -167,7 +167,7 @@ <h4>Making web motions with
<div class="entry">
<div class="entry__meta">
<h6>Motion<span></span>#5</h6>
<h4>Mouse follow</h4><br>
<h4>Mouse Follow</h4><br>
<h5><ul class="inner-links">
<li><a href="#top">Top <i class="fa-solid fa-arrow-turn-up"></i></a></li>
</ul>
Expand Down
4 changes: 2 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ const activateMagnet = (event) => {
/*
dngr.innerHTML = 'cursorX ' + event.clientX + '<br>boxleft: ' + Math.ceil(boundBox.left) + '<br>cursorInsideButton: ' + Math.ceil(event.clientX - boundBox.left) + '<br>relativeToTotalWidth: ' + ((event.clientX - boundBox.left)/magnet.offsetWidth).toFixed(2) + '<br>shifted: ' + ((event.clientX - boundBox.left)/magnet.offsetWidth - 0.5).toFixed(2)
*/

//move button to its new position
gsap.to(magnet, {
duration: 1,
Expand All @@ -172,9 +173,8 @@ const activateMagnet = (event) => {
ease: Power4.easeOut

})


}

//mouse leave stuff
const resetMagnet = (event) => {
//move button to its default position
Expand Down

0 comments on commit cc56abb

Please sign in to comment.