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

Fill in the blank to create an animation that slides an element up after 2 seconds. $('.my-element')._____-_____ ;

I wrote $('.my-element').show(2000) .slideUp(); $('.my-element').display(2000) .slideUp();

5 Answers

You need to use delay() and slideUp():

$('.my-element').delay(2000).slideUp();

Happy coding!

Thank you so much!!!!

LaVone you could atleast vote his answer :)

What a bro looking out! :smile:

Thanks again that was my first question!

I used slideUp().delay(2000); and it rejected my answer. Is it because of the order?

console is not accepting this solution. Showing error

i tried that answer but its not working