Jump to content
Search Community

Animation stopped working, "to" is working but "from" doean't work

Sam124 test
Moderator Tag

Go to solution Solved by OSUblake,

Recommended Posts

The animation code is working fine on codepan but not in my local or on the website, I also checked for console errors/warning but nothing there.

Already tried changing js versions but no luck.

 

It was all working fine but suddenly stopped working without err.

It only works in local if I change script to " gsap.to(masks[1], {" but I need " gsap.from(masks[1], {"

index.html

See the Pen bGorORj by jalakdhml (@jalakdhml) on CodePen

Link to comment
Share on other sites

  • Solution

It's hard to say why something isn't working for you locally or on your live site if it works fine on CodePen. We can't comment on an issue we can't see.

 

That said, why don't you just try a fromTo animation if you are having trouble?

 

gsap.fromTo(masks[1], {
  height: "0%"
}, {
  height: "100%",
  ease: "none",
  scrollTrigger: {
    trigger: ".revealer",
    start: "top top",
    pin: true,
    end: "+=100%",
    scrub: 0.5,
  },
});

 

  • Like 1
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...