Use delegate instead of '.on' so even stays bound after table change