Created
June 5, 2020 19:56
-
-
Save ryandejaegher/cd4ed1b420eb219ab3a1520777e8b16f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Add to Code Injection -> Footer | |
| <script> | |
| window.addEventListener('load', function(){ | |
| var next = document.querySelector('.summary-carousel-pager-next'); | |
| var autoSlide = function(){ | |
| next.click() | |
| }; | |
| var startSlideInterval = function(){ | |
| interval = setInterval(autoSlide,2000); | |
| console.log('interval started'); | |
| } | |
| var interval; | |
| var stopSlideInterval = function() { | |
| clearInterval(interval); | |
| console.log('interval cleared') | |
| } | |
| var summarySection = document.querySelector('[data-section-id="5ecc4a6ae3d0ce7bf21dda19"]'); | |
| summarySection.addEventListener('mouseover', stopSlideInterval); | |
| summarySection.addEventListener('mouseout', startSlideInterval); | |
| startSlideInterval() | |
| }) | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment