piearcy Posted September 11, 2014 Share Posted September 11, 2014 I keep saying I'm going to have to learn javascript and then the library jQuery but find myself learning Swift now instead. Short one today. I want these two functions to occur back to back. Second function only begins after the first function is complete. $(function() { $('.tlt').textillate(); }) $(function() { $('.tlt1').textillate(); }) If you can please help me with this not only in just code to make that happen but also an explanation of what you did I sure would appreciate it. I've read all morning on promises etc. but have yet to be successful in implementing this. As you can tell I'm using the plug-in textillate to fade text out one letter at a time. Works great! But I have multiple paragraphs I'm wanting to apply this too so I can't make the div class .tlt since I then lose all paragraphs since it's strips it into spans. That would be ideal of course but I think I forced into making different classes for each paragraph. This will become problematic in the future though since the content is generated dynamically and I will have no idea how many paragraphs that dynamic content will contain. So if there was a way to keep my <p> and </p> that would be even better. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/291000-when-done-thenjquery/ Share on other sites More sharing options...
Solution CroNiX Posted September 11, 2014 Solution Share Posted September 11, 2014 Check the docs for your plugin. There is a callback function that executes after the animation has completed. That's the only way you'd be able to know when it completes. Quote Link to comment https://forums.phpfreaks.com/topic/291000-when-done-thenjquery/#findComment-1490750 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.