Jump to content

When done then...jquery


piearcy

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/291000-when-done-thenjquery/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.