Last active
August 7, 2023 17:14
-
-
Save oooh-boi/fe1383ebf8aa693c2c6de05fde86099c to your computer and use it in GitHub Desktop.
This file contains 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
<script> | |
;( function() { | |
// wait until gsap & ScrollTrigger available | |
let chck_if_gsap_loaded = setInterval( function() { | |
if( window.gsap && window.ScrollTrigger ) { | |
// register scrolTrigger | |
gsap.registerPlugin( ScrollTrigger ); | |
// ... do your thing | |
my_stuff(); | |
// clear interval | |
clearInterval( chck_if_gsap_loaded ); | |
} | |
}, 500 ); | |
function my_stuff() { | |
} | |
} )(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment