Jump to content

[SOLVED] Event does not fire on dynamic content


TheFilmGod

Recommended Posts

I have dynamically created content using javascript. However, it seems like I can't get of the dynamically generated content to fire events when clicked. The only thing i could find on google about this "event does not fire unless appended to DOM..." anyone care to help me?

I finally figured out after like 2 hours of grueling agony. I remapped all the events onto the events immediately after the innerhtml. The reason is simple - the elements did not exist before innerhtml so the program needs to remap the new events onto the elements after they are created. Google has let this miracle happen. 2+ hours of searching got me to finally find the answer.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.