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 trialJoe Nguyen
25,189 PointsWhat did I do wrong? Quiz Please fill in correct answer.
The question said to fill in the blanks with a element that slides the element up after 2 seconds here is what I did.
$('my-element').slideUp.(2000);
What exactly did I do wrong?
2 Answers
Gabbie Metheny
33,778 Points$('my-element').slideUp.(2000)
will slide the element up over a duration of 2 seconds, but the quiz directions tell you to create an animation that slides an element up after 2 seconds. You need to use chaining to set a delay()
of 2 seconds, followed by the slideUp()
.
Hope that helps!
Joe Nguyen
25,189 PointsAh thank you Steven.
Joe Nguyen
25,189 PointsJoe Nguyen
25,189 PointsHere is what I did it's still wrong: $(β.my-elementβ).slideUp(2000).delay(); and $(β.my-elementβ).slideUp().delay(2000);
Steven Parker
231,236 PointsSteven Parker
231,236 PointsThe delay must come before the slide function (and include the timing value).