Below is part of the jquery code I have which displays the file input and a \"Clear File\" button.
var $imagefile = $(\'\').attr({
type: \
Another solution if you want to be certain that this is cross-browser capable is to remove() the tag and then append() or prepend() or in some other way re-add a new instance of the input tag with the same attributes.
$("#fileinput").remove();
$("")
.attr({
type: 'file',
id: 'fileinput',
name: 'fileinput'
})
.appendTo($("label[for='fileinput']"));