Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

214
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!