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 Object-Oriented JavaScript (2015) Constructor Functions and Prototypes Making the UI Work

Buttons Not Working - No Hints/Errors From Console

https://w.trhou.se/nmja542zf3 is a snapshot of my code.

I thought I followed along but I must be missing something as none of my buttons work.

1 Answer

Do the buttons work but not give the expected functionality or do they just not work at all? Because if it is the former then I think the reason is that you are missing a space on line 19 of your song.js file.

Where you set:

htmlString += 'class="current"';

it should be:

htmlString += ' class="current"';

------------------^ - Notice the space here

Because without the space the resulting htmlString would be

<liclass="current">Here Comes the Sun - The Beatles<span class="duration">2:54</span></liclass="current">

instead of

<li class="current">Here Comes the Sun - The Beatles<span class="duration">2:54</span></li class="current">

Let us know if it doesn't fix your problem.