I have seen the other posts and have a simple piece of code that works when clicking the add but not when clicking delete.
$(document).ready(function() { rowcount(); $('.mytable').on('click', '.form-del.field', function () { alert("I clicked delete"); rowcount(); }); $('.mytable').on('click', '.cf-table-add-row', function () { alert("I clicked add"); rowcount(); $('#q9 input').trigger('change'); }); function rowcount() { $('.myrows input').val($('.mytable tr').length-1); } });
I have alerts in there so it tells me when I click add and delete. Add works, delete does not . I have tired both cf-table-delete-row and the other various delete syntax I can find. Anyone know what the delete row click is?
What I am doing is populating a field with the number of rows. Everytime add or delete is clicked it runs the function. Adding works great but deleting never triggers the function.
-Chris