Skip to content

Instantly share code, notes, and snippets.

@oooh-boi
Last active August 7, 2023 17:14
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save oooh-boi/fe1383ebf8aa693c2c6de05fde86099c to your computer and use it in GitHub Desktop.
Save oooh-boi/fe1383ebf8aa693c2c6de05fde86099c to your computer and use it in GitHub Desktop.
<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