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) 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