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
Dylan Aresu
9,687 PointsNEED HELP(EASY JS)
basicly im typing in document.body.children[0].hide().show("slow"); in the console log while doing the task on teamtreehouse.. the link is https://teamtreehouse.com/library/jquery-basics/introduction-to-jquery/what-is-jquery im trying to basicly add the hide show effect the "Its a trap" logo and im unsure why this document.body.children[0].hide().show("slow") wont work considering the bodys first child is a paragraph and the paragraph is the first array... -.-!
1 Answer
Ryan Hunt
16,091 PointsYou need to wrap the object you are trying to manipulate in parenthesis and it'll work.
Try
$(document.body.children[0]).hide().show("slow");
Dylan Aresu
9,687 PointsDylan Aresu
9,687 Pointsthis is the error i get back from the console... Uncaught TypeError: Cannot read property 'hide' of undefined(…)
and yes i have jquery script src link at the bottom of my index.html page :)