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

212
Vistas
how can i make the tabindex of the specific class every element to -1

I am trying to run a loop over the code where i want to loop over the div and if there is any tab index on any element inside that div, i want it to be -1 instead of 0

i tried this code but its not working,

document.querySelector('.app-container-grid').forEach((grid,index) => {
        grid.setAttribute("tabindex", -1); 
      });

it just keeps the tabindex to whatever value it has and does it not change it to -1

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

0

i want to loop over the div and if there is any tab index on any element inside that div

This will select all elements with a tabindex attribute inside .app-container-grid and changes the tabindex attribute to "-1"

document.querySelectorAll('.app-container-grid [tabindex]').forEach((element) => {
    element.setAttribute("tabindex", "-1");
});
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