Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

213
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda