Silver Challenge: Showing the Value as the Slider Changes
Create a handler for the slider’s
change
event. As the value of the
slider changes, show the number next to the label for the
slider.
As an extra challenge, change the color of the number (or the label) to reflect the intensity of the caffeine strength. Use green for weaker coffee, yellow for regular strength coffee, and red for very strong coffee.
Get Front-End Web Development: The Big Nerd Ranch Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.