Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript JavaScript and the DOM (Retiring) Getting a Handle on the DOM Practice Selecting Elements

Can I have some assistance please?

On the last challenge of the 2nd stage of the Javascript and the DOM. I'm stuck on associating the links in the nav to the navigationLinks. I've tried adding the class="selected" to the other links and but bummer message keeps saying that their is only one class even though I've added them to the others. I was wondering if it may be possible to pinpoint tag elements nested inside other elemnts?

Any assistance would be appreciated.

Thanks

2 Answers

Adam Beer
Adam Beer
11,313 Points

Challenge Task 3 of 3

On line 3 of app.js, select all images in the footer element and assign them to footerImages.

Use the ** querySelectorAll () ** method. Select the "footer" and "img" elements in the "footer". Don't change the html file, this is not a HTML course :) Hope this help.

I've tried to do it with this code let footerImages = document.querySelectorAll("footer"); what's wrong?

Thanks

Adam Beer
Adam Beer
11,313 Points

Andrew you are near. Inside the querySelectorAll() method select footer img. Hope this help.