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
Post a Comment