Jump to content
Search Community

ScrollTrigger undefined in InternetExplorer in Nuxt project

Code32
Moderator Tag

Recommended Posts

Posted

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?

ZachSaucier
Posted
4 hours ago, Code32 said:

Does anybody know what may be causing this?

There was an issue in version 3.3.0 that caused an error in IE. Upgrade to 3.3.1 and the issue should go away :) 

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...