I have an image on page that has been resized to fit in a div, say, 400x300. How can I get the full size of the image (~4000x3000) in jQuery? .width() and .height() only seem to
Try this:
var pic = $("img")
// need to remove these in of case img-element has set width and height pic.removeAttr("width"); pic.removeAttr("height");
var pic_real_width = pic.width(); var pic_real_height = pic.height();