Jump to content
Search Community

ScrollTrigger undefined in InternetExplorer in Nuxt project

Code32 test
Moderator Tag

Recommended Posts

nuxt.config.js

script: [
  { src: 'https://cdnjs.cloudflare.com/ajax/libs/gsap/3.3.0/gsap.min.js' },
  { src: 'https://cdnjs.cloudflare.com/ajax/libs/gsap/3.3.0/ScrollTrigger.min.js' },
],
plugins: [
  {
    src: '~plugins/gsap.js',
    ssr: false
  },
],

 

plugins/gsap.js

gsap.registerPlugin(ScrollTrigger);

 

Then in my components:

 

this.intersected = !this.lazy;

gsap.to(this.$el, {
  scrollTrigger: {
    trigger: this.$el,
    start: 'top bottom+=500px',
    onEnter: ({progress, direction, isActive}) => this.intersected = true,
  },
});

 

In all modern browsers, this works perfectly but in Internet Explorer, all I get is scrolltrigger is undefined and it breaks the rest of the site.

 

Does anybody know what may be causing this?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...