Jump to content
Search Community

LX45

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by LX45

  1. So, I'm working on a Nuxt website and use Gsap for the animation. I wrote the functions and everything works fine when I refresh the page. But as soon as I'm switching from page to page within my website. The animations wont work no more. Because GSAP can not find the elments As soon as I refresh the page, the animations work again. I create the functions within methods, and call them in the mounted hook.
  2. LX45

    Nuxt.js - ScrollTrigger

    Okay, now its working, the normal Gsap Animations work fine. Thank your for your help. But now I'm having another issue, the scrollTrigger animation within a component isn't working, I do not get an error message, it's just not working. I attached the component file
  3. LX45

    Nuxt.js - ScrollTrigger

    If I do it like this I get the Error Gsap is not defined. But If i look in my node_modules folder i can see the gsap folder?
  4. LX45

    Nuxt.js - ScrollTrigger

    In this file I import the plugins. import { gsap } from "gsap"; import { ScrollTrigger } from "gsap/ScrollTrigger"; if (process.client) { gsap.registerPlugin(ScrollTrigger); } Where should I import them if not in this file?
  5. LX45

    Nuxt.js - ScrollTrigger

    Thank you for the reply. I initiale just integrated the cdn. Now I installed gsap via npm. But now I get the error gsap is not defined. Even though I Integrated it in my nuxt.config file build: { transpile: ["gsap"] }, plugins: [ { src: "~/plugins/gsap", ssr: true} ], and the gsap.js file in the plugin folder looks like this import { gsap } from "gsap"; import { ScrollTrigger } from "gsap/ScrollTrigger"; if (process.client) { gsap.registerPlugin(ScrollTrigger); } Did I miss something?
  6. Hi, I wanted to use the ScrollTrigger Plugin in my Nuxt Application but somehow it does not work, can someone help me? I attached my config, js, and component file.
  7. Hey, can somebody help me, the scrollTrigger Plugin wont work, what am I doing wrong?
×
×
  • Create New...