Skip to content

Commit

Permalink
Run shuffle text animation on window load
Browse files Browse the repository at this point in the history
Ensures that the code executes correctly
  • Loading branch information
andydotdaniel committed Oct 12, 2024
1 parent 715fc81 commit 3a3a068
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,12 @@ import Layout from '../layouts/Layout.astro';
element.classList.add('keyword-shuffle-animate-out');
});
setTimeout(runShuffleTimer, interval, index, newState);
}
}
}
runShuffleTimer(0, 0);

window.onload = () => {
runShuffleTimer(0, 0);
};
</script>

<script>
Expand Down

0 comments on commit 3a3a068

Please sign in to comment.