JQuery Image Dimensions

Simple code to grab the dimensions of any image on your page. Here’s an example:

My Image

Tell JQuery to find out how big this image is by using:

var width = $("#my_image").width();
var height = $("#my_image").height();

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>