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

117
Vistas
how to change the color of all href tab with an id associated with it inside a d3 function and work for other html pages where the id is available

I want to highlight rows that meet a condition as well as highlight an html tab with an id #htmlTab using d3

my code looks like this:

d3.rows.style('background-color', function(d){
if(row meets condition){
document.querySelector("#htmlTab").style.color = "orange";
return 'orange'}
 })

So at first d3 will highlight the rows if it meets the condition and then queryselector will color the #htmlTab. The problem I am having is that it is only changing the color of the the one tab that has the d3 table. I want it to color all the tabs that has an id #htmlTab on different pages as well. If this code is outside the d3.style function, it works for all the html tabs with that id: document.querySelector("#htmlTab").style.color = "orange";

about 4 years ago · Juan Pablo Isaza
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