Image doesn't load on Opera 10
Hello everyone,
I try to get an image size like this :
- $("a").click(function(){
- var img = '<img id=\"i\" src=\"'+ $(this).attr("href") +'\" alt=\"'+ $(this).attr("title") +'\" />';
- $("body").append(img);
- $("#i").load(function() {
- $("#is").text("image size : " + $("#i").width() +" x "+ $("#i").height());
- });
- return false;
- });
Opera shows nothing.
If I don't use the .load() function Firefox 3.6 shows first the size of the alternative text. Then if I click a second time it shows the image size.
Does anyone knows how to do without using an exception?
Regards,