I have a table with 3 action buttons and a select element, the data in the table changes after selecting an option in this select (action buttons remain the same, with different attributes values, obviously), after I "clean" (with .html("")) the table and show the new data, action buttons stop working (they preserve the same class as in the table original state), I found a few solutions but I don't know how to implement in my project, because I'm using jquery.
For example, I want to try the answer in this question, but the example he gives is pure JS, not jQuery.
Is it really the problem that buttons preserve the same class? If it is, how to remove the event listener from the original elements? I'm using jQuery to manage click events.
Just after I posted this question I went to try out the given solution in the link of "possible solution", I copied and pasted the code after the click event handler from jQuery (you know, $(document).on("click")
, etc).
Maybe this question would be useful for people who has the same problem but doesn't know exactly what to search to get a solution. I had the same issue.