I have an image on my html document and I’ve put it like this:
<img src="picture.jpg:/>
I reference it in jquery by:
$('img').click( function() {
alert($(this).attr('width'));
});
It catches the event but it returns undefined value. Is there another way on how to extract the width and height?
Use
jsFiddle example