1
my browser is not displaying the image. Fear something wrong with this code?
$(document).ready(function ()
{
$("input[name='fun_imagem']").change(function ()
{
readImage($(this));
});
});
function readImage(input) {
var arquivo = new FileReader();
arquivo.onload = function(e)
{
$("#imagem-figure-usuario").attr("src", e.target.result);
};
arquivo.readAsDataURL(input.files[0]);
}
Dude, you’re absolutely right. It’s working perfectly now. You have some explanatory link about this difference between $(this) and this?
– Pedro Soares
@Pedrosoares I found one for you at Sopt: http://answall.com/questions/37770/qual-a-diferença-entrethis-e-this-e-this
– Klaider