I'm trying to align the input below each image after having uploaded using file reader. Follow the screen print and the codes:
JS:
$(function(){varimagesPreview=function(input,placeToInsertImagePreview){if(input.files){varfilesAmount=input.files.length;for(i=0;i<filesAmount;i++){varreader=newFileReader();reader.onload=function(event){$($.parseHTML('<imgclass="img-galeria img-thumbnail img-galeria" >')).attr('src', event.target.result).appendTo(placeToInsertImagePreview);
$($.parseHTML('<input class="form-control painel-input-galeria" type="text" name="titulo-img" placeholder="título da imagem">')).appendTo(placeToInsertImagePreview);
},
reader.readAsDataURL(input.files[i]);
}
}
};
$('#imagem').on('change', function() {
imagesPreview(this, 'div.galeria');
});
});
HTML
CSS already tried several alternatives and I could not.