Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Shehzad

animation trigger with a delay

Recommended Posts

Hi there

 

First of all thanks to all who have supported me through all my problems and I can't thanks enough. 

 

The main problem is my animation starts with a delay (not from the code). I do not know what causing it. But when I reverse the animation it just reverse at the right time without any delay.

project involves some page transition but there is a delay weather I reload the page or make the page transition in both cases there is delay.

 

I attached the required files as I am using parcel bundler so could not make a demo on codepen.

 

Can someone pls explain why there is delay on start and not on reverse and how to to solve it.

Any suggestions if I am doing something in the wrong way, other then problem above will be highly appreciated.

 

Regards,

Shehzad Asif

package.json about.html about.js home.js

index.html style.css index.js

Link to post
Share on other sites

Hi,

 

You can create a live editable sample of an app bundled with Parcel in codesandbox. Just create a VanillaJS sandbox, I believe that by default those projects actually use Parcel to bundle the app. All you have to do then is just install all the dependencies you need.

 

https://codesandbox.io/

 

Happy Tweening!!!

  • Like 5
Link to post
Share on other sites
4 hours ago, Shehzad said:

The main problem is my animation starts with a delay

secAbtTl

.from(
".sec-about-presentation h1",
{
// yPercent: 100,
opacity: 0,
stagger: 0.1
},
"<0.5"
)

 

"<0.5"

This adds 0.5 delay at the start of the tween.

  • Like 5
Link to post
Share on other sites

Many Many thanks to you Tailbreezy.

 

What a silly mistake I made and could not figure out myself. You solved it man. I really appreciate it.

 

 

Link to post
Share on other sites

No worries.

No mistake is silly plus  you have learned how to upload to codesandbox, which will only help you get better feedback here in the future.

  • Like 2
Link to post
Share on other sites

yes, you are right.

I am very happy it is solved.

 

Thanks again.

Link to post
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.

×