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 trialEmbie Wong
3,180 PointsThe hide button isn’t working
I followed the steps exactly, but my button doesn’t hide the list. For me, the “=>” in the function is orange instead of black like in the video. Does that make a difference? Thanks.
vladimirv
12,124 PointsPost the snippet of the whole code, you might have missed something trivial (as I do very often :D ).
1 Answer
Juan Avalos
10,020 PointsSame issue too!
const toggleList = document.getElementById('toggleList'); const listDiv = document.querySelector('.list'); const input = document.querySelector('input'); const p = document.querySelector('p.description'); const button = document.querySelector('button');
toggleList.addEventListener('click', () => { listDiv.style.display = 'none'; });
button.addEventListener('click', () => { p.innerHTML = input.value +':' });
under my addEvent it is not showing up as the same color as the rest of the line.
Quinton Shuman
7,068 PointsQuinton Shuman
7,068 PointsI believe the orange is just how the text editor they give you indicates to you that it is a function.