Share Posted July 6, 2018 So, if you check out my codepen, you'll see the 'contact' area in the lower right hand corner. The end goal is to make it so that if you click on contact, it will reveal an email address, which after 5 seconds will disappear. I am able to get it to appear nicely with TweenMax by setting it's autoAlpha to 0 then 1 once element with id="contact" is clicked. So I have this working all through a timeline, or at least that's what I'm trying to do. I also have a function I called "InitialState" which I also have set as a timeline animation, and my plan for that is to call it when specific buttons are pressed or after 5 seconds or so goes by. I read a bit about the 'onComplete' event, so my idea was to call InitialState using onComplete and some kind of delayed timer (In my example I haven't even started on the delay ye). My first question is, is this a smart way to do this? Should InitialState really be a timeline? Second of all, why doesn't InitialState ever get called? In console I can see that it says it isn't a function, but I don't understand this because I'm defining it with var the same way I did with my other animation function. Obviously I'm a little confused on a couple things here - any help would be really appreciated. Can't wait to master GSAP someday. See the Pen JZQEbP by connorv (@connorv) on CodePen Link to comment Share on other sites More sharing options...
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
Already have an account? Sign in here.Sign In Now