How to clear the img placeholder for choose image using jQuery -


i have form fileupload.

<input class="file" type="file" name="files[]"> 

i curently cloning input, if file choosen clones choosen filinput, there way clear selected image?

script: $('.fieldset-content_doc').first().clone().appendto('.fieldset-clone_doc').find('.file').reset();

fieldset-content_doc: holds formvalues

apparently issue reproducible on firefox. but, can set value property of element null:

$('.fieldset-content_doc')     .first()     .clone()     .appendto('.fieldset-clone_doc')     .find('.file')     .each(function() { this.value = null; }); 

see fiddle


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -