Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

311
Vistas
How can i change webkit-slider-thumb color using javascript?

I want to change the color of the input range and it works with CSS, But i want to change the color using javascript. Please help to fix this.

Working CSS

input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  background: goldenrod !important;
}

Javascript code

document.querySelector('.plyr--full-ui input[type=range]').style.setProperty('--plyr-range-thumb-background', 'green')

Any solution appreciated!

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You're in the right direction with CSS custom properties (variables). Just change the background to the custom property and set its default color:

input[type='range']::-webkit-slider-thumb {
  --plyr-range-thumb-background: goldenrod;
  -webkit-appearance: none;
  background: var(--plyr-range-thumb-background);
}
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda