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

93
Views
Javascript addeventlistener Event Loop

I have a dropdown table like this

A header
First
Second
Third

when user click it, a table open and I will get that item ID

A header
First
First item content
Second
Third

The addEventListener used for getting a elementId, then I can fetch the particular URL, but it work only a "click" detected. I want having a addEventListener checking No click event ,then I can simulate the click event for updating fetch.

const change= document.getElementById("select");
change.addEventListener('click', (event) => {
//stuff
fetch(`www.abc.com/{event.target.id}` )
.then ......
})

Can I do it like this?

change.addEventListener(!'click', (event) => {
var test =setInterval(loop,40000);    
     function loop()  {              
         change.click()               
     }       
})
about 4 years ago · Juan Pablo Isaza
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!