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 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,314 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,314 Points

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