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) Traversing the DOM Getting All Children of a Node with children

Code not working, down button super tiny, no error in console

The "Up" and "Remove" buttons are functional and are normal but the "Down" button doesn't work and is a tiny gray button. I think I followed all the instructions. My workspace is https://w.trhou.se/dob28kh6aw

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there, babyoscar! First, thank you for posting a shareable snapshot to your workspace. This was tremendously helpful! :smiley:

The problem with the "down" button actually lies in the "remove" button.

On lines 17 - 20, you create the down button, set the class and attach it to the DOM. But then, immediately after, on lines 22 - 25, you overwrite those. On lines 22-25 you have this:

let remove = document.createElement('button');
down.className = 'remove';  // this should be remove.className
down.textContent = 'Remove';  // this should be remove.textContent
li.appendChild(remove);

But you meant:

let remove = document.createElement('button');
remove.className = 'remove';
remove.textContent = 'Remove';  
li.appendChild(remove);

Hope this helps! :sparkles:

It worked! Thanks, I marked your answer as best answer