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

201
Visualizações
How to filter (by clicking in a value of a select ) the li elements of an ul that's being created by a javascrip function fom data coming from api

I've tried multiple ways, but they just work on li elements that are in the html file and not the ones being created by a javascript function.

the code is here: https://github.com/inesmm666/forum

The function addAUser in forum.js defines how the li element is going to look like and adds it to the ul with the id("lista-projetos-global") in the forum.html file. The api rest requests are in the api.js file.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Since new elements are added later after the page has loaded, they also miss the appropriate event listeners you setup for the one already rendered. To solve this, you can take advantage of the event propagation by listening for the event in a common ancestor and this technique is called Event Delegation.

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