CSS
.redslider::-webkit-slider-thumb {
background-color: red;
}
jQuery
$('input[type=range]').addClass('redslider');
Why?
::-webkit-slider-thumb
isn't actually a selector. It's like setting an :active
through a style attribute which isn't possible. That makes it so we have to make it in a class and add it. You could use document.styleSheets
but that is ambiguous, complicated, and is overkill for a simple task such as this