I have the following code in a input
of type file
:
$('input-imagem').on('change', function() {
alert( $(this).val());
});
It works almost right, when I click out of input
it gives alert
again and this should not occur, it should give alert
only when I choose an image.