There is a table (generated by javascript) of the form:
row = $('<tr class="paid">'); row.append($('<td>').text(i + 1)); ...
row.append($('<td>').html('<input value="' + type + '" type="checkbox" checked id="' + dog.number + '">')); how to send ajax when the checkbox state changes? The function of sending difficulties does not cause. with a static element is not difficult (addEventListener), but how to write a listener for a dynamic element is not possible.
$("#countries input:checkbox").change(function() {});Secondly, if your content is dynamically generated, then it is either trite to wait for its formation and then hang the event in the same way as for a static one, or hang the event (s) at the moment of generating the code. Read about asynchrony, in general, and the stages of triggering of a code, you can start with the function jquery.ready () - it’s not too much in the subject, you will understand the principle - Stanislav Belichenko