get image width and height - Jquery

by Ramya 2012-10-18 19:01:06

get image width and height in jquery:

You can get image width and height in jquery without specifying it.


$(document).ready(function(){
var getImg = $("img");
alert(getImg.width()+"--"+getImg.height());
});


html code,
<img src='./next.png'>


it will give you the exact height and width of the image...
1156
like
0
dislike
0
mail
flag

You must LOGIN to add comments