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

198
Vistas
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 Respuestas
Responde la pregunta

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 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