0
I am inserting dynamically in my table, until then everything ok. The problem is when I try to click on one of the lines and I have no answer, I think I’m not entering in the DOM, someone could help me.
INSERTING:
$('#tabelaChat').append('<tr><td style="font-size: 9pt;">'+ data.flag[i].nome +'</td></tr>');
AT THE CLICK:
$('#tabelaChat tr').on('click', function(e){
alert("Teste");
return false;
});
It is not very clear what the relationship of
append
with theclick
... Are you sure yourdata.flag[]
contains data?– brasofilo
Brasofilo, the data is loading perfectly because it appears in the table. What didn’t happen was the click, I wasn’t getting add in the DOM, the answer was solved below. Thank you.
– Pedro A.