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
vy le oai4,697 Points
This function can only be run one time, please help me
When clicking the white box, the parent box will increase its size then the text gradually apprears. But after clicking the close button and clicking the white box again, the parent box still increases its size while the text doesn't appear. Just don't know why. Please help me, thank you very much for your help!
Tim Knight28,888 Points
You might consider assigning your setTimeout to a variable so when you close the box you can execute
window.clearTimeout(timeoutVariable) to clear your timer and get you back to your foundational state.