Jquery click event doesn't fire on a new table row
Jquery click event doesn't fire on a new table row
Jerry2016
Posts: 7Questions: 4Answers: 0
Hi, I am trying to add a new row to the table, and there is a dropdown select in the cell. The click event works for the existing row, however, it doesn't work for the newly added row. Any suggestion?
https://live.datatables.net/vimuqehi/1/edit
This question has an accepted answers - jump to answer
Answers
Your question is not specific to Datatables. In fact the test case doesn't use Datatables. For general Javascript and jQuery questions it is better to use a forum like Stack Overflow.
You will want to use jQuery delegated events. Updated test case:
https://live.datatables.net/vimuqehi/2/edit
Kevin