fellas. I have this code that appends a row with some elements, among them an input file:
$('#uploadDocumentoEnviarAseguradora').on('click', function() {
var num_ficheros = $('.lista-ficheros').length + 1;
var linea = '<div class="form-group"><div class="row form-horizontal lista-ficheros"><div class="col-xs-9"></div><input type="file" id="docEnviarAseguradora' + num_ficheros + '" class="documentoEnviarAseguradora"/><button class="btn btn-default btn-xs" id="uploadDocumento"><span class="glyphicon glyphicon-trash"></span></button></div></div>';
$(this).parent().parent().parent().append(linea);
$("#docEnviarAseguradora" + num_ficheros).click();
});
And I have that one that handles when that new input file gets clicked.
$('documentoEnviarAseguradora').on('change',function() {
alert("pos ok");
});
But I get no response when I load the file on my input file. Can you see what I'm doing wrong? Thank you in advance :)