I'd like one of the automatically generated columns in the table to have a function to delete the row, but the on click is not working. How should I do this?
$(document).ready(function(){
$("#associar1").on("click", function(e){
var coluna = "<tr>";
coluna += "<td width='40%' align='center'><input type='text' disabled = 'disabled' value= "+$("#canal").val()+" name='vigenciaCanalVendaVO.canalVendaVO.codigo'/></td>";
coluna +="<td width='40%' align='center'><input type='text' mask = '99/99/9999' disabled = 'disabled' data-mask='data' data-date-type='default' size='12' maxlength='10' value="+$("#dataInicioVigencia").val()+" name='vigenciaCanalVendaVO.dataInicioVigenciaAssociacaoPlano'/>"
coluna +="Até<input type='text' mask='99/99/9999' data-mask='data' disabled = 'disabled' data-date-type='default' size='12' maxlength='10' value="+$("#dataFimVigencia").val()+" name='vigenciaCanalVendaVO.dataFimVigenciaAssociacaoPlano'/></td>";
coluna +="<td align='center'><img src='/includes/images/bt_remover.gif' id='remover' style='cursor:pointer;cursor:hand;'/></td>";
coluna += "</tr>";
//alert(coluna);
($('#tabelaCanais')).append(coluna);
});
});
$("#remover").on("click",function(e){
$(this).parent().parent().remove();
});