I am trying to get the actual width of an image...here is the image in question
<img src="upload/<?php echo $array['image'] ?>" height="200" class="active" />
and this what I have tried in jQuery
$(window).bind('load', function() {
var img_width = $("#slideshow").find("img").width();
$("#slideshow img").css("width", img_width);
alert(img_width);
});
the alert returns 255 for every images i've tried this with, which is the width of the div slideshow. with the height of these images all being 200 they will have different widths, my question is, how do I get these widths?
Thanks, J