Jump to content
Search Community

AssaSSAins

Members
  • Posts

    5
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

AssaSSAins's Achievements

0

Reputation

  1. I have a div tag as display: none in my css. I have a button element which has an event listener. When clicked, I would like it to make the div tag visible. I have tried using opacity and that did not work. Then, I tried some more. Would I have to use something else then gsap.to, is that the issue? If so, please let me know what to use. Thanks. function check() { console.log("hey"); gsap.to(".gra", { autoAlpha: 1 }); }
  2. i put the js file, but i figured the issue out. Thanks for the help.
  3. Here is a quick example. I am probably just missing something. I am trying to do this with npm. ex.js ex.html
  4. I have been using gsap, and i have came across a issue. If i call this script in the html page and then write my animations in a <script> tag, my animations work fine, but as soon as i switch to my js file to clean up the html page, no animations work. I did npm init, and npm install gsap --save.I have tried importing multiple ways, with different animation syntax. The first part is what i used before which worked, and the second part is with the external js file and the html <script> tag. <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.4.0/gsap.min.js"></script> <script type="text/javascript" src="PATH TO MY JS FILE(I DID WRITE THE ACTUAL PATH HERE, TO LET YOU KNOW" ></script> import { gsap } from "gsap"; gsap.to(".head", { y: 300, ease: "bounce" });
×
×
  • Create New...