Is it possible to make the prepended file input appear below the previous element instead of above it. So that in this jquery, the “Select a file:” text remains on top of all added elements
$(document).ready(function(){
$('#add_more').click(function(){
var current_count = $('input[type="file"]').length;
var next_count = current_count + 1;
$('#file_upload').prepend('<p><input type="file" name="file_' + next_count +'" /></p>');
});
});
<p>Select a file: <input name="file_1" type="file">
<input type="submit" name="send" value="Send" ></p>
<a id="add_more" href="#">add more</a>
Switch To append 🙂