1
I want to add an ok icon when the person adds a photo in the form, to show her that the photo was added, the problem is that I have an image that I should follow and then the file name does not appear, I want to make it easy for the user to know that the photo has been added successfully and he can submit the form.
<p>Selecione sua FOTO</p>
<label for="photo">
<input type="file" name="photo" id="photo" style="filter:alpha(opacity=0); -moz-opacity:0; opacity:0;">
<p class="icon-ok" id="iconeOk"></p>
<script>
$(function(){
if($("input:file")!=null){
$('.icone-ok').addClass();
}
});
</script>
+1 It should be remembered that in HTML the element
#iconeOk
should initially be without the classicon-ok
(or: each time the form is reset - if applicable - this class must start away).– mgibsonbr
It worked, thank you so much for your help.
– hahnmatheus