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 jQuery Basics (2014) Creating a Simple Drawing Application Perform: Part 2

Please help!! My color slider is not working and not updating

Not getting any errors in chrome console. Below is a snapshot.

https://w.trhou.se/is5fs5sryu

3 Answers

Stephen Layton
Stephen Layton
8,643 Points

If you are using Chrome you may need to tweak your code a bit, everything looks fine in your work space though. From the teachers notes:

Changes to Chrome

Chrome used to allow you to use the .change() method on a range input type but they implemented incorrectly and wasn't compliant with the W3C standards. This was fixed in a later version of Chrome. So this code no longer works:

$("input[type=range]").change(changeColor);
Now you use the input event instead like this:

$("input[type=range]").on("input", changeColor);

Thank you !!!! :) you solved my issue . I later noticed the code I used worked on safari but was not changing on chrome . This explains it

rydavim
rydavim
18,813 Points

It looks like you haven't gotten to the point of 'hooking up' your add color button yet, but your sliders are working for me.

When adding a color, I can manipulate the sliders to change the color in the new color window. The color updates appropriately to all three slider settings.

Can you elaborate on the unintended behavior you're experiencing?

It seems to be working correctly for me, so I might suggest making sure the files are all saved, refreshing your browser, and clearing your cache.

weird it's not working for me , I am on latest version chrome and the 3 sliders are not changing colors in the color box which is the span. I am on latest version chrome on mac. Are you using a different browser?

Julian Aramburu
Julian Aramburu
11,368 Points

Hi! I don't really understand what your problems is... all the code in your snapshot seems fine and everything that is coded works when previewed...if you mean that when you press the "add color", nothing happens...well that's because you didn't programmed that part yet as it seems in:

//When New color is pressed //append color to the controls ul //select new color

//On mouse events on the canvas //Draw lines

no I mean the 3 sliders are not changing colors in the span box for me when I slide them. I am on latest version chrome on mac. Are you using a different browser?