Jump to content
Search Community

Stopping or resolving a dynamically created timeline

innocean_dev test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I'm not sure I follow. You just want the timeline to do something on a click event? Here's a fork of your pen in which I just added a listener to the headlines div which will play/pause on click.

 

See the Pen vPVWOp by PointC (@PointC) on CodePen

Is that what you meant?

 

I see you asked something similar in this thread:

I assume this is all the same project? Hopefully that helps. Happy tweening.

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

Yes, this was a follow up to the same project. The last person who assisted didn't respond, so I decided to start a new thread. But anyhow, you have helped greatly. I see what was wrong now that I have looked at your addition. Somehow, this codepen snippet is actually part of a larger scale project. In the project, I realized that there was something a tad bit different than in the codepen example—the scope. The headline was created within a function—that was also within a function. My call to the timeline object was not reached because of the scope somehow. So I just resolved the headline on click from within the function. Hope that makes sense. I know it might be hard without seeing exactly what I am seeing, but I'm not able to post the larger project yet. Anyhow, thanks much for your help. Mission accomplished! :) 

Link to comment
Share on other sites

Thanks Craig, yeah that post from Shaun wasn't appearing up until just now when you mentioned it. Not sure why I didn't see it before but I've checked over the past two days, but didn't see anything. Probably something I did wrong. Anyhow, thanks much for your help!

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