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

Naivedya Bansal
5,483 Pointscolor change on moving slider
in the current implementation, the color changes when i let go of the slider button,is there a way to program so that the color changes while we are sliding the button?
1 Answer

Greg Kaleka
39,020 PointsThis is actually really easy to do. All you have to do is change $(".sliders").change(function...
to $(".sliders").mousemove(function...
. That way, the app recalculates the color whenever your mouse is moving in the slider section (including while you're dragging them).
You could probably refine it a bit so it only changes them when the mouse is moving and clicked (similar to what we do for the actual drawing), but this works as a quick fix.