Skip to content

Commit

Permalink
Update head.html
Browse files Browse the repository at this point in the history
add event listeners to stop animation on mouseover and restart on mouseout
  • Loading branch information
bwbohl committed Dec 6, 2022
1 parent 5d500e2 commit 8ea8558
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
const indexCarousel = document.getElementById("index-carousel");
if (indexCarousel !== null) {
animateCarousel(indexCarousel, 3000);
indexCarousel.addEventListener("mouseover", event => {
stopCarouselAnimation(indexCarousel);
});
indexCarousel.addEventListener("mouseout", event => {
animateCarousel(indexCarousel, 3000);
});
}
});
</script>
Expand Down

0 comments on commit 8ea8558

Please sign in to comment.