I have this code: http://jsfiddle.net/gk5pV/8/
It’s function is to add a td value to the absentees list. When clicked again, it should remove the td value from the absentees list. I got it working, however, the
$("#collect").append("<input type='hidden' name='absent[]' value = '" + temp + "'/>" + currentCellText);
value doesn’t get removed. Only the text gets removed but the hidden value, which posts the hidden data for submission to databaase won’t get removed. Any ideas?
i haven’t seen the code but from the look of it you need to use
delegateor if the table is not dynamically added then you can delegate the event to it like
the reason is the handlers do not get themselves attached to the dynamically added elements
if you are using jquery 1.7+ use
onmethod