Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Element appears after js finished running

Hello,

I have this <div> with elements h1, h2 and but <a>(button> . h1 and h2 are in span which is running typewriter effect js script without loop. Can you help me to figure out how to make button fade in after js typewriter effect finished.

Would you guys suggest try to make it with js or just to do css fade in with that element?

Steven Parker
Steven Parker
243,253 Points

To facilitate analysis, please show or link to your code.

1 Answer

Steven Parker
Steven Parker
243,253 Points

Without seeing the code this is a bit generic, but since you're animating the titles in JS, it should be easy to fade the button with script code after the title sequence ends.

Alternately, you could determine how long the title animation takes, and then just set up a CSS animation for the fade in with that same time as a delay.