Click event doesn’t work on dynamically generated elements [duplicate]
The click() binding you’re using is called a “direct” binding which will only attach the handler to elements that already exist. It won’t get bound to elements created in the future. To do that, you’ll have to create a “delegated” binding by using on(). Delegated events have the advantage that they can process events from … Read more