Jump to content
Search Community

Phelar

Members
  • Posts

    4
  • Joined

  • Last visited

Phelar's Achievements

0

Reputation

  1. I don´t have a good answere to that I gues it feels more like home... I´ll try the non-module version.
  2. Ok, i solved this issue but i get this error when trying to import the gsap module like this import { gsap } from "gsap" i get this error: Uncaught TypeError: Failed to resolve module specifier "gsap". Relative references must start with either "/", "./", or "../" though i can reach and implement the method from the module gsap.to(".duck", {duration: 2, x: 300})
  3. Hi, thanks! So you mean that the syntax is ok, it should work?
  4. Hi! I´m trying to get started with gsap, but i need some help. This is my html: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="keywords" content="HTML, JavaScript"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> .test { background-color: black; } </style> </head> <body> <div class="test"> <img class="duck" src="/assets/anka.png" alt="Fin Anka"> </div> <script type="module" src="node_modules/gsap/all.js"></script> <script type="module" src="/app.js"></script> </body> </html> and this is my .js: import {gsap} from './node_modules/gsap' gsap.to(".duck", {duration: 2, x: 300}) AND this is the error:
×
×
  • Create New...