Hello, I'm adding rows from a table (tblformacao) using javascript and in this line I add an input and I'm listening to the onchange (.upload) event, however it does not fall into the method. When I switch to onclick it works. Can anyone tell me what I'm doing wrong?
$('#tblformacao').append('<tr><td>' + option.Text + '</td>' +
'' +
' <td>Não</td> ' +
'<td> <button class="btn-delete ui-state-default ui-corner-all" onclick="deletelinha(this)"> ' +
' <span class="icon-remove-sign" /></button> ' +
'<input type="file" class="upload" /> ' +
' </td>' +
' <td></td> ' +
' <td></td> ' +
'<td style="display:none;">' + $("#CargoId").val() + '</td>' +
'</tr>'
);
$(".upload").on('change', function (e) {
});