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 trialSunny Singh
1,148 PointsPlease help!! My color slider is not working and not updating
Not getting any errors in chrome console. Below is a snapshot.
3 Answers
Stephen Layton
8,643 PointsIf 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);
rydavim
18,814 PointsIt 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.
Sunny Singh
1,148 Pointsweird 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
11,368 PointsHi! 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
Sunny Singh
1,148 Pointsno 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?
Sunny Singh
1,148 PointsSunny Singh
1,148 PointsThank you !!!! :) you solved my issue . I later noticed the code I used worked on safari but was not changing on chrome . This explains it